4

I am trying to use the sqlcipher (2.0.8) in my project for API 16 (Motorola Xoom 4.1.2) and getting the following stacktrace. I have the 3 so libraries in armeabi folder in libs and icudt46l.zip in the assets folder. I have SQLiteDatabase.loadLibs(context); in onCreate of my activity. Yet, the application crashes when I I create a database.

11-08 21:00:33.050: E/AndroidRuntime(2222): FATAL EXCEPTION: Main:
11-08 21:00:33.050: E/AndroidRuntime(2222): net.sqlcipher.database.SQLiteException: not an error
11-08 21:00:33.050: E/AndroidRuntime(2222):     at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method)
11-08 21:00:33.050: E/AndroidRuntime(2222):     at net.sqlcipher.database.SQLiteDatabase.<init>(SQLiteDatabase.java:1952)
11-08 21:00:33.050: E/AndroidRuntime(2222):     at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:902)
11-08 21:00:33.050: E/AndroidRuntime(2222):     at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:945)
11-08 21:00:33.050: E/AndroidRuntime(2222):     at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:107)
Win Myo Htet
  • 5,377
  • 3
  • 38
  • 56

2 Answers2

13

The reason is that I have the icudt46l.zip in the asset folder of the library project. I have to copy icudt46l.zip into the asset folder of the application project. Here is more info on this https://github.com/sqlcipher/android-database-sqlcipher/issues/64

Win Myo Htet
  • 5,377
  • 3
  • 38
  • 56
0

Try to unistall your app and install it again .. In my case, eclipse face some problems to add new asset file.

febaisi
  • 644
  • 6
  • 15