Skip to content

UnsatisfiedLinkError below Android ver 5.0 #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sunil19822701 opened this issue Feb 18, 2017 · 10 comments
Closed

UnsatisfiedLinkError below Android ver 5.0 #302

sunil19822701 opened this issue Feb 18, 2017 · 10 comments

Comments

@sunil19822701
Copy link

LIb AAR Version : android-database-sqlcipher:3.5.5@aar

Log From Below Anrdoid ver 5.0 using test suite
FATAL EXCEPTION: AsyncTask #1
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: load_library[1098]: Library '/system/lib/libhoudini.so' not found
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:195)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:188)
at net.zetetic.tests.TestSuiteRunner.runSuite(TestSuiteRunner.java:36)
at net.zetetic.tests.TestSuiteRunner.doInBackground(TestSuiteRunner.java:20)
at net.zetetic.tests.TestSuiteRunner.doInBackground(TestSuiteRunner.java:12)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 
at java.lang.Thread.run(Thread.java:856) 

Running Well On Android Ver 5.0 and Above Tested till 7.1 ver
On both emulators and real devices lib wokrin fine on or above version 5.0 but app crashes on below android version 5.0 when it try to loadlibs()
Culprit : '/system/lib/libhoudini.so'

above log is from testsuite app and following log is from my app

02-18 06:10:50.029 1964-1964/s.s.c.sqlichiper E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Cannot load library: load_library[1098]: Library '/system/lib/libhoudini.so' not found
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:195)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:188)
at s.s.c.sqlichiper.sqlchipper.onCreate(sqlchipper.java:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4151)
at android.app.ActivityThread.access$1300(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

Scrrenshot of android 5.0 emulator
device-2017-02-18-114358
Screen Shot of android 4.1.1 emulator
device-2017-02-18-114530

using test suite

How can i run this library for android version below 5.0
Can you please help
(Sorry for my english)

@developernotes
Copy link
Member

Hello @sunil19822701

We are working on a fix to the 3.5.5 release, however it may not resolve this specific issue. SQLCipher for Android does not have a dependency on libhoudini.so, an ARM to x86 translation library. We expect to publish the fix we are working on that will address an issue with running SQLCipher for Android on devices running API below 21 soon.

@sunil19822701
Copy link
Author

Son in current situation what can i do to make it run on below version Android 5.o is there any solution so that i can use this lib below version 5.0

@developernotes
Copy link
Member

Hello @sunil19822701

We have released SQLCipher for Android 3.5.6. Would you try that build to see if it addresses the issue you are experiencing?

@sunil19822701
Copy link
Author

Nope Not Working on Sql Cipher For Android 3.5.6 version also getting same crash
Clean Build and uninstalled old app

log
02-24 13:55:55.838 26636-26636/s.s.c.sqlichiper E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Cannot load library: load_library[1098]: Library '/system/lib/libhoudini.so' not found
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(SQLiteDatabase.java:213)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:230)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:209)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:202)
at s.s.c.sqlichiper.sqlchipper.onCreate(sqlchipper.java:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4151)
at android.app.ActivityThread.access$1300(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

@developernotes
Copy link
Member

Hello @sunil19822701

SQLCipher does not have a dependency on libhoudini. Are you intentionally not including x86 native libraries within your application?

@sunil19822701
Copy link
Author

I dont know how to add native libraries to project i am using android studio
and using
compile 'net.zetetic:android-database-sqlcipher:3.5.6@aar'
in dependecies

how to add native libraries
i am still at learning stage

@sunil19822701
Copy link
Author

Ok i solved the problem
its working on below 5.0 i forgot to delete jinlibs folder from project after deleting it its working now
thanks for you help
and for the library too

@developernotes
Copy link
Member

Hi @sunil19822701

I'm glad to hear everything is working for you. Take care!

@prathapbez
Copy link

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/base.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_dependencies_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_0_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_1_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_2_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_3_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_4_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_5_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_6_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_7_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_8_apk.apk", zip file "/data/app/sg.com.mobileeftpos.paymentapplication-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/sg.com.mobileeftpos.paymentapplication-1/lib/arm, /private2/lib, /vendor/lib, /system/lib]]] couldn't find "libnexgo_sdkemvjni.so"

Getting this issue if I add this library("compile 'net.zetetic:android-database-sqlcipher:3.5.6@aar'") for version 5.0
Can any one please help in this

@developernotes
Copy link
Member

Hello @prathapbez

I can see you have opened another ticket (#380), so I will respond over there.

@sqlcipher sqlcipher locked and limited conversation to collaborators Apr 16, 2018
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

3 participants