Unsatisfied communication error when using the SQLCipher library

I am using the SQLCipher library for Android to encrypt / decrypt a DB file. I follow the exact steps that were discussed in the API to add a library.

But I get Unsatisfied error message when I run the project ... Here is logcat ...

11-15 13:12:08.482: ERROR/AndroidRuntime(340): java.lang.UnsatisfiedLinkError: dbopen
11-15 13:12:08.482: ERROR/AndroidRuntime(340):     at info.guardianproject.database.sqlcipher.SQLiteDatabase.dbopen(Native Method)
11-15 13:12:08.482: ERROR/AndroidRuntime(340):     at info.guardianproject.database.sqlcipher.SQLiteDatabase.<init>(SQLiteDatabase.java:1876)
11-15 13:12:08.482: ERROR/AndroidRuntime(340):     at info.guardianproject.database.sqlcipher.SQLiteDatabase.openDatabase(SQLiteDatabase.java:870)
11-15 13:12:08.482: ERROR/AndroidRuntime(340):     at info.guardianproject.database.sqlcipher.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:904)
11-15 13:12:08.482: ERROR/AndroidRuntime(340):     at info.guardianproject.database.sqlcipher.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:107)
11-15 13:12:08.482: ERROR/AndroidRuntime(340):     at com.myproject1.getInstance(AppData.java:60)

Please give me any link or hint.

+5
source share
3 answers

you need to add the .so files to the libs / armaebi folder of your eclipse project and rebuild.

+3
source

java.lang.UnsatisfiedLinkError occurs when the SQLCipher library was not initialized before use.

To solve the problem, call SQLiteDatabase.loadLibs(this);before use.

For instance:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    SQLiteDatabase.loadLibs(this);

    // Set up the window layout
    setContentView(R.layout.main);

    //instance of database adapter
    db = DBAdapter.getInstance(this);

    //load database
    db.load("password goes here");
+14

Could you share which version of SQLCipher for Android you are using? We recently released a new version of SQLCipher for Android with many changes. If you are not up to date with the latest releases, you can get here .

+1
source

All Articles