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

UnsatisfiedLinkError #42

Closed
SLieve opened this issue Mar 10, 2014 · 2 comments
Closed

UnsatisfiedLinkError #42

SLieve opened this issue Mar 10, 2014 · 2 comments

Comments

@SLieve
Copy link

SLieve commented Mar 10, 2014

I am getting this error:

03-09 21:49:57.368: E/AndroidRuntime(27702): java.lang.UnsatisfiedLinkError: Couldn't load lept from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.datumdroid.android.ocr.simple-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.datumdroid.android.ocr.simple-2, /vendor/lib, /system/lib]]]: findLibrary returned null

This happens here:

03-09 21:49:57.368: E/AndroidRuntime(27702):    at com.datumdroid.android.ocr.simple.SimpleAndroidOCRActivity.onPhotoTaken(SimpleAndroidOCRActivity.java:211)

Which is this code:

TessBaseAPI baseApi = new TessBaseAPI();

From previous issues, they have said to make sure the build target is the same in the library as the project, but it is, as seen in these screenshots:
capture
capture1

@ductranit
Copy link

I can see there is no lib folder (which contain .so files) in your tess-two library. You have to build tess-two with ndk-build before using it. Check this link to setup tess-two and you should read android ndk document first.

@rmtheis rmtheis closed this as completed Mar 11, 2014
@DiGatsby
Copy link

For me it kept giving this error even though I had the "libs" folder after building it with ndk-build. I don't know what was going on but I fixed it by renaming the "libs" folder to "lib", packing it as zip and changing the suffix from .zip to .jar. After that I opened my project's properties in Eclipse and added the external jar into Libraries in Java Build Path.

Works, but I have a feeling there would be a better way to do it. There shouldn't be need for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants