Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlcipher crashing with "not an error" stacktrace

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)
like image 922
Win Myo Htet Avatar asked Dec 12 '22 20:12

Win Myo Htet


1 Answers

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

like image 145
Win Myo Htet Avatar answered Jan 06 '23 16:01

Win Myo Htet