Unsatisfied Link error


#1

Hi Nick/All,

could you please help me with below error…

06-02 14:43:34.902: E/AndroidRuntime(10023): java.lang.UnsatisfiedLinkError: Native method not found: net.sqlcipher.database.SQLiteDatabase.dbopen:(Ljava/lang/String;I)V
06-02 14:43:34.902: E/AndroidRuntime(10023): 	at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method)
06-02 14:43:34.902: E/AndroidRuntime(10023): 	at net.sqlcipher.database.SQLiteDatabase.<init>(SQLiteDatabase.java:1942)
06-02 14:43:34.902: E/AndroidRuntime(10023): 	at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:875)
06-02 14:43:34.902: E/AndroidRuntime(10023): 	at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:907)
06-02 14:43:34.902: E/AndroidRuntime(10023): 	at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:132)

#2

Hello @AVD

Did you call SQLiteDatabase.loadLibs(…); before you attempted to initialize your SQLiteOpenHelper sublcass? Have you verified the native binaries are being included within the application?


#3

Yes corrected. I was loadingLibs in main activity which was not getting triggered the second time. Now I moved the SQliteDatabase.loadLibs(); to DBHelper class. Issue is resolved. Thanks Nick


#4

Hello @AVD - we are glad to hear your issue is resolved!


#5

Could you please tell me, In which method of BD class, you have putted method SQliteDatabase.loadLibs().