.UnsatisfiedLinkError with Lept library

27 views
Skip to first unread message

Amr Bakri

unread,
Aug 22, 2015, 2:55:18 PM8/22/15
to tesseract-ocr
i am trying to run OCR app, and when i ran the App it crashed and i received "java.lang.UnsatisfiedLinkError: Couldn't load lep from loader dalvik"
then i looked for solution for the similar problem on google, and i downloaded Leptonica library "leptonica-1.72" and installed it in in the C:\lept.

and in my code i added the following:

static {
system.loadLibrary("c:\\lept\\lept");
}
and when i executed it again, i received the belowLogcat output.
please let meknow how to fix it.


**logcat**:

08-22 19:45:56.750: E/AndroidRuntime(1337): FATAL EXCEPTION: main
08-22 19:45:56.750: E/AndroidRuntime(1337): Process: com.example.ocr_test_0, PID: 1337
08-22 19:45:56.750: E/AndroidRuntime(1337): java.lang.UnsatisfiedLinkError: Couldn't load C:\lept\lept from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.ocr_test_0-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.ocr_test_0-2, /system/lib]]]: findLibrary returned null
08-22 19:45:56.750: E/AndroidRuntime(1337): at java.lang.Runtime.loadLibrary(Runtime.java:358)
08-22 19:45:56.750: E/AndroidRuntime(1337): at java.lang.System.loadLibrary(System.java:526)
08-22 19:45:56.750: E/AndroidRuntime(1337): at com.example.ocr_test_0.MainActivity.<clinit>(MainActivity.java:21)
08-22 19:45:56.750: E/AndroidRuntime(1337): at java.lang.Class.newInstanceImpl(Native Method)
08-22 19:45:56.750: E/AndroidRuntime(1337): at java.lang.Class.newInstance(Class.java:1208)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.app.ActivityThread.access$800(ActivityThread.java:135)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.os.Handler.dispatchMessage(Handler.java:102)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.os.Looper.loop(Looper.java:136)
08-22 19:45:56.750: E/AndroidRuntime(1337): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-22 19:45:56.750: E/AndroidRuntime(1337): at java.lang.reflect.Method.invokeNative(Native Method)
08-22 19:45:56.750: E/AndroidRuntime(1337): at java.lang.reflect.Method.invoke(Method.java:515)
08-22 19:45:56.750: E/AndroidRuntime(1337): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-22 19:45:56.750: E/AndroidRuntime(1337): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

Reply all
Reply to author
Forward
0 new messages