i want to encrypt database file in my project.i am using sqlCipher for this work.but when insert values in table get error same this: net.sqlcipher.database.SQLiteException: no such table: categories: , while compiling: INSERT INTO categories(...);
gradle file:
maven {
url "http://ift.tt/1asOQMt"
}
and
dependencies {
compile'com.commonsware.cwac:sqlcipher-for-android:3.3.1'}
cunstructor of DBHandler:
public DBEncryptedHandler(String dbName) {
databaseName = dbName;
_dbHelper = new DatabaseHelper(app.getContextThis(), app.getDatabaseName(), null, app.getDatabaseVersion());
SQLiteDatabase.loadLibs(app.getContextThis());
File databaseFile = app.getContextThis().getDatabasePath("db_name");
databaseFile.mkdirs();
databaseFile.delete();
_writableDatabase = SQLiteDatabase.openOrCreateDatabase(databaseFile, DB_PASS, null);
}
please help me):
Aucun commentaire:
Enregistrer un commentaire