java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null (tess-two)
Asked Answered
P

4

10

I am using sqlcipher.jar for encrypting database in android and also using it's native library in

libs/armeabi folder

1)libdatabase_sqlcipher.so

2)libsqlcipher_android.so

3)libstlport_shared.so

and

libs/x86 folder

1)libdatabase_sqlcipher.so

2)libsqlcipher_android.so

3)libstlport_shared.so

and jar file named sqlcipher.jar in libs/ folder all i have imported

now every thing is working fine it's going good database is fetching and reading from sqlite is also working fine and also i am not getting any kind of error in SQLiteDatabase.loadLibs(context); line

enter image description here but i want to implement also OCR in my project to do that i am importing project named tess-two from this http://code.google.com/p/tesseract-ocr/ and https://github.com/rmtheis/tess-two in that there is a library named tess-two folder

and i am importing that project library into my android project and i cleaned my project and run it at that time i got the error in line SQLiteDatabase.loadLibs(context);

enter image description here

again when i removed tess-two library and doing uninstall from device and doing clean and build and run it's working fine no error is occurring, i want OCR functionality also in my project can anybody help me

Pyrogenous answered 26/10, 2013 at 5:35 Comment(0)
K
22

I had same issue.. I was using Android Studio and I had imported application from eclipse to android studio.

I spent 3-4 hours to find out the solution. Here what I did to solve this issue.. (Only for Android studio) Create Directory into src folder name it main and other directory as per following image. You may have libs and assets folder outside of src folder, in main directory of project, that is eclipse structure. We will need to follow Android Studio's structure.. enter image description here

For more details.. Check this link...

For other helps regarding SqlCipher check this link..

(I know I am bit late to answer this question but it might help someone.)

Kitchenmaid answered 12/9, 2014 at 15:37 Comment(4)
Worked like a charm, I created the folder jniLibs folder inside app directory thats why it was not working. Thanks for the screenshot, helped me alot.Toliver
Pure talent, this is perfect solutionForan
Awesome... Indeed perfect solution :)Dall
yup.. so src/main/jniLibs/armeabi/xyzib.so is the folder where library should be placedOrthocephalic
C
4

I was running into the same issue. First of all, check that all the libraries are correctly imported.

In my case the problem was that when we added another library project, these project had a armeabi_v7 folder, so apparently if will take precedence over the armeabi folder, meaning that the sqlitecypher libraries won't be located.

In our case the solution was just to remove the armeabi_v7 folder on the new library.

Hope it helps.

Chug answered 21/1, 2014 at 15:49 Comment(0)
M
0

You can try to change the line:

APP_STL := gnustl_static (in the file tess-two / tess-two / jni / Application.mk)

to: APP_STL := stlport_static

Meeker answered 21/11, 2013 at 7:0 Comment(0)
B
0

The loader is not able to find the said library file. So, I decided to pack it along with my app. It's only 394KB

I downloaded the libstlport_shared.so from the following address and added it to the lib/armeabi and lib/armeabi-v7a folders, cleaned the project and rebuilt it. Now it runs without a problem.

http://331312256.wodemo.net/browse/dl/156348/lib/armeabi/libstlport_shared.so?resolved=1

Hope that helps

Butternut answered 26/12, 2015 at 9:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.