Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Fix Android 4.4 libpng linking issue. Closes #106.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtheis committed Aug 24, 2015
1 parent 9e99699 commit 5e931b2
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion tess-two/jni/com_googlecode_leptonica_android/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ LOCAL_LDLIBS += \
-llog

# common
LOCAL_SHARED_LIBRARIES:= libpng
LOCAL_SHARED_LIBRARIES:= libpngt

LOCAL_PRELINK_MODULE:= false

Expand Down
2 changes: 1 addition & 1 deletion tess-two/jni/libpng/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ LOCAL_SRC_FILES_arm64 := $(my_src_files_arm)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_SHARED_LIBRARIES := libz
LOCAL_LDLIBS := -lz
LOCAL_MODULE:= libpng
LOCAL_MODULE:= libpngt
include $(BUILD_SHARED_LIBRARY)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class AdaptiveMap {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Binarize {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Box.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class Box {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Boxa.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class Boxa {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Clip.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
public class Clip {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Convert.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Convert {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Edge.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
public class Edge {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Enhance.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Enhance {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

public class GrayQuant {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/JpegIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class JpegIO {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
public class MorphApp {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Pix.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
public class Pix {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Pixa.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
public class Pixa implements Iterable<Pix> {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class ReadFile {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Rotate.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
public class Rotate {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Scale.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Scale {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
2 changes: 1 addition & 1 deletion tess-two/src/com/googlecode/leptonica/android/Skew.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Skew {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
public class WriteFile {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

public class PageIterator {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
System.loadLibrary("tess");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class ResultIterator extends PageIterator {
static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
System.loadLibrary("tess");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class TessBaseAPI {
private long mNativeData;

static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
System.loadLibrary("tess");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TessPdfRenderer {
private final long mNativePdfRenderer;

static {
System.loadLibrary("png");
System.loadLibrary("pngt");
System.loadLibrary("lept");
System.loadLibrary("tess");
}
Expand Down

2 comments on commit 5e931b2

@soluckythanh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed same your guide, but I have problem

java.lang.UnsatisfiedLinkError: Couldn't load pngt from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.vietthanh.myapplication-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.vietthanh.myapplication-1, /vendor/lib, /system/lib]]]: findLibrary returned null

Can you help me?

@rmtheis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try re-running your ndk-build.

Please sign in to comment.