Unsatisfied Link error while using SQLCipher library

后端 未结 3 1671
旧时难觅i
旧时难觅i 2020-12-20 21:18

I am using the SQLCipher Library for Android to Encrypt/Decrypt the DB file. I am following the exact steps that were discussed in the API to add the library.

But I

相关标签:
3条回答
  • 2020-12-20 21:34

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

    0 讨论(0)
  • 2020-12-20 21:35

    java.lang.UnsatisfiedLinkError happens when the SQLCipher library was not initialized before using.

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

    For example:

    @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");
    
    0 讨论(0)
  • 2020-12-20 21:57

    Could you share what version of SQLCipher for Android you are using? We have recently released a new version of SQLCipher for Android with many changes. If you are not currently up to date with the latest release you can get it here.

    0 讨论(0)
提交回复
热议问题