Android Question SQLCipher FileNotFoundException: icudt46l.zip

Q Candiani

Member
Licensed User
Hi, I try to generate a new db with SQLCipher:
B4X:
Sub DB_Click
   Try
     Dim cnn As SQLCipher
     dirSistema = File.DirRootExternal & "/Testing"
     Dim cur As Cursor
     cnn.Initialize(dirSistema, "test.db", True,"abc","")
   Catch
     Log(LastException)
   End Try
End Sub
... but i get the follow Runtime.exception:

java.lang.RuntimeException: java.io.FileNotFoundException: icudt46l.zip
at net.sqlcipher.database.SQLiteDatabase.loadICUData(SQLiteDatabase.java:150)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:182)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:169)
at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:50)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:748)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:343)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:259)
at b4a.example.main._migratesqlite(main.java:431)
at b4a.example.main._activity_create(main.java:393)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:703)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.io.FileNotFoundException: icudt46l.zip
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:313)
at android.content.res.AssetManager.open(AssetManager.java:287)
at net.sqlcipher.database.SQLiteDatabase.loadICUData(SQLiteDatabase.java:135)
... 29 more

I work with Android Version 6.0 and SQLCipher v 1.30 and SQL v 1.30.

I followed all steps on the first post of https://www.b4x.com/android/forum/threads/android-database-encryption-with-sqlcipher-library.14965/

I copied the file icudt46l.zip into my project folder. But I could not adding the following line to the main activity "#DebuggerForceStandardAssets: true" because with this line rise the following error:


java.io.FileNotFoundException: panpresentacion.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:313)
at android.content.res.AssetManager.open(AssetManager.java:287)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:202)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:78)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at b4a.example.main._activity_create(main.java:381)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:703)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

I don't understand wich could the problem. Any idea?

Thanks.
 
Last edited:
Top