Android Question Applying sqlcipher-android-4.10.0.aar that fixes 16KB issues with SQLCipher

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all.

Thanks to @GeoffT660 , @Shelby and @DonManfred we now can download a replacement for SQLCipher aar that will allow us to continue using it with 16KB requirements.

I did some tests on my test computer - here is a result.

I just in case first archived my AdditionalLib folder in case if something will go wrong.

I removed existing files such as

android-database-sqlcipher-4.0.0.aar
android-database-sqlcipher-4.2.0.aar
android-database-sqlcipher-4.5.4.aar

Then I downloaded sqlcipher-android-4.10.0.aar from https://repo1.maven.org/maven2/net/zetetic/sqlcipher-android/4.10.0/ and put it into my AdditionalLib folder.

Opened B4A, opened my project and tried to compile it. It didn't work - the B4A says that can't find android-database-sqlcipher-4.5.4.aar file. I run the search in AdditionalLib folder to see what file has a reference to android-database-sqlcipher-4.5.4.aar. It was SQLCipher.xml. Opened it and at the very bottom there is a line
B4X:
 <dependsOn>android-database-sqlcipher-4.5.4.aar</dependsOn>

I replaced it with sqlcipher-android-4.10.0.aar. Tried to compile it again - so far so good.

I did it on my test computer which is located in a different place (connected via remote desktop) so I didn't actually ran my project on the app.

My question is - did I miss something else or not?
 

Shelby

Well-Known Member
Licensed User
Longtime User
My only question is, "Did you remove the sqlite-2.4.0 file? That's the file I mentioned which had a name differing from the sqlcifer files we were discussing in the other thread.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
Not working for me.
I downloaded the sqlcipher-android-4.10.0.aar and placed in the additional libraries folder, same place as the sqlcipher.xml

I edited the Depends on from: <dependsOn>android-database-sqlcipher-4.5.4.aar</dependsOn>

to this: <dependsOn>sqlcipher-android-4.10.0.aar</dependsOn>

Saved and Refresh my libraries tab. But when I compiled I get this error

** Activity (main) Create (first time) **
java.lang.NoClassDefFoundError: Failed resolution of: Lnet/sqlcipher/database/SQLiteDatabase;
at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:51)
at b4a.example.main._activity_create(main.java:401)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at b4a.example.main.afterFirstLayout(main.java:105)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8705)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
Caused by: java.lang.ClassNotFoundException: net.sqlcipher.database.SQLiteDatabase
... 19 more
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Gee, how disappointing. It's beyond my abilities to help so my guess is that you might start a new thread to attract the attention of some brainy members. Good luck
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
It's just came to my mind- what if we will update
Not working for me.
I downloaded the sqlcipher-android-4.10.0.aar and placed in the additional libraries folder, same place as the sqlcipher.xml

I edited the Depends on from: <dependsOn>android-database-sqlcipher-4.5.4.aar</dependsOn>

to this: <dependsOn>sqlcipher-android-4.10.0.aar</dependsOn>

Saved and Refresh my libraries tab. But when I compiled I get this error

** Activity (main) Create (first time) **
java.lang.NoClassDefFoundError: Failed resolution of: Lnet/sqlcipher/database/SQLiteDatabase;
at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:51)
at b4a.example.main._activity_create(main.java:401)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at b4a.example.main.afterFirstLayout(main.java:105)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8705)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
Caused by: java.lang.ClassNotFoundException: net.sqlcipher.database.SQLiteDatabase
... 19 more
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Did you try to close the B4A and open again?
 
Upvote 0
Top