Cannot find .so file error in tesseract ocr - android

This is my error while trying to implement tesseract ocr
dlopen("/data/app-lib/app.my.myocr-12/liblept.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libjpgt.so" needed by "liblept.so"; caused by load_library(linker.cpp:745): library "libjpgt.so" not found
I am getting above error while trying to implement ocr using tesseract. I am using ndk 10 and have successfully built project. Can someone help me with my problem. Why am I getting this error

I had the same problem and found this:
github issue #150
Try adding this code to your app class:
static{
System.loadLibrary("jpgt");
System.loadLibrary("pngt");
System.loadLibrary("lept");
System.loadLibrary("tess");
}

Related

Failed to load native library

Failed to load native library when i work with ndk functions in android studio. so please help me i am new for doing this and please correct me if wrong any where. Actually i was doing some scanning document using cardio sdk.
Basically i want to scan any document like cardio but i want to scan boundary not text or number only boundary of documents. if you have any other solution then please suggest me.
This is my activity code.
if (nUseNeon()) {
System.loadLibrary("cardioRecognizer");
Log.i(Util.PUBLIC_LOG_TAG, "Loaded card.io NEON library");
}
This is my error in my log cat.
Failed to load native library: JNI_ERR returned from JNI_OnLoad in "/data/app/com.surfaceview2-1/lib/arm/libcardioRecognizer.so"
Please check that:
1) you have the libcardioRecognizer.so library in the folder: app/src/main/jniLibs/armeabi of your Android Studio project
2) the library is compatibile with the architecture of the device you're using. If not, you can compile it and place in the folder:
app/src/main/jniLibs/armeabi-v7a (for arm-v7 architecture)
app/src/main/jniLibs/x86 (for x86 architecture)

java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null

I am working with CsipSimple and try to create an account in local network...the build runs fine....but i can't make my account active....at the beginning of the project run it catches an exception java.lang.UnsatisfiedLinkError.......and it says unable to load native library...I have been searching all day long...i created armeabi-v7a under lib folder....and I have downloaded two .so file from firefox nightly build as descripted in this link.... here but i have same problem....please help me with this
Thrown when an attempt is made to invoke a native for which an implementation could not be found.
http://developer.android.com/reference/java/lang/UnsatisfiedLinkError.html
Please check this link https://stackoverflow.com/a/22121375/1761003
Please do post some code for better reply

Unsatisfied link error Library not found

I want to extract Text from image simply implement OCR(Optical Character Recognition) in Android using Library LEPTONICA and TESSERACT.I have succesfully added the open source library to my sample project But when i am running my application but on run time app force closes and error was .... ExceptioninInitialization UnspecifiedLink Error...Library Not found
Any suggetion how to resolve this error...I am stuck on this

jni problems when system load the .so file

I have already created .so file and put it in proper path.
However,when I try to run the android program the problem came by.
the problem is:
`5-16 15:34:16.704: E/AndroidRuntime(9968): Caused by: java.lang.UnsatisfiedLinkError:
Cannot load library: reloc_library[1311]: 1584 cannot locate '_Z13raptor_decodePKhtPKtPhjPK15RaptorParam_tag'...
raptor_decode is a function which included by the jni_function.`
what should i do to correct this problem? Thanks.
I think here is your problem:
1584 cannot locate '_Z13raptor_decodePKhtPKtPhjPK15RaptorParam_tag'
if raptor_decode is the method you want to call, read up here: http://java.sun.com/docs/books/jni/html/design.html (and read up 11.3)

Android library media_jni not found

I'm trying to replicate this class called MediaMetadataRetriever in my own android project. You can see the class here:
https://android.googlesource.com/platform/frameworks/base/+/master/media/java/android/media/MediaMetadataRetriever.java
In line # 40 you can see: System.loadLibrary("media_jni");
How do I get that library? My logcat shows this:
Caused by: java.lang.UnsatisfiedLinkError: Library media_jni not found
This is a JNI class, which is created in C/C++ and included as a SO in your app. The class is loaded during runtime.
Look here https://android.googlesource.com/platform/frameworks/base/+/master/media/jni

Categories

Resources