Integrating SQLCIPHER in Android Studio Project

江枫思渺然 提交于 2019-11-28 10:29:01

add this to your build.gradle of your app and it should work out of the box:

dependencies {
     compile 'net.zetetic:android-database-sqlcipher:3.5.2@aar'
     ...
}

In your code, you should load the 'native libraries' as this 'aar' file contains a few of them.

SQLiteDatabase.loadLibs(context);

NOTE that you should use the net.sqlcipher.database.SQLiteDatabase instead of android.database.sqlite.SQLiteDatabase, just like a couple of other SQLite classes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!