Android Question Solved:Encryption Initialization Creation

Shelby

Well-Known Member
Licensed User
Longtime User
My problem is that my project will no longer compile now that I have attempted to use SQLCipher invented by Zetetic.net.

On a tutorial by Erel,(https://www.b4x.com/android/forum/t...ryption-with-sqlcipher-library.14965/#content), Erel tells me to use the following line to initialize the SQLCipher method.

SQL1.Initialize(File.DirRootExternal, "1.db", True, DB_PASSWORD, ""):

Unfortunately, the IDE slips me the note; Undeclared variable 'SQL1' is used before it was assigned any value.

In actuality I don't have a variable SQL1 anyway, so how shall I change the wording to make it work for my project. I'll attach a screenshot of when the compilation goes haywire.... Whoops, the image was too large. Here's the wetransfer.com link:
https://we.tl/t-vXVH78nqBw

Of course my project is an SQLite one. It has 712 records
 
Solution
Your Additional Libraries path is this (see red border)
微信图片_20240630020631.png

but you put android-database-sqlcipher-4.5.4.aar into project folder not Additional folder
微信图片_20240630020722.png

You should put the android-database-sqlcipher-4.5.4.aar into folder C:\Users\HP\Desktop\Projects\Additional Libraries\B4A

微信图片_20240630021452.png

Shelby

Well-Known Member
Licensed User
Longtime User
I took a big chance and exited the IDE; just brought it up again; didn't help

Yes file seems to be ok in Addnl folder although I had to rename it
It had a (3) in the name which I removed so IDE could identify it
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Lastly I've looked all through my project and the only squiggly line is in my Main module

B4X:
Sub Activity_Create(FirstTime As Boolean)

I suppose it not important
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Lastly I've looked all through my project and the only squiggly line in in my Main module

B4X:
Sub Activity_Create(FirstTime As Boolean)

I suppose it not important
But my additional libraries is in my projects folder. Do you think I should change the folder location and then change the path configuration?
 
Upvote 0

teddybear

Well-Known Member
Licensed User
But my additional libraries is in my projects folder. Do you think I should change the folder location and then change the path configuration?
No, just show the folder, see if the android-database-sqlcipher-4.5.4.aar is existed
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
But my additional libraries is in my projects folder. Do you think I should change the folder location and then change the path configuration?
Can I have the folder in both locations and then change the configuration?
OK I did it

1719682031341.png

But! Same Results

B4A Version: 12.80
Parsing code. (0.14s)
Java Version: 14
Building folders structure. (0.03s)
Running custom action. (0.17s)
Compiling code. (0.11s)
Compiling layouts code. (0.00s)
Organizing libraries. Error
Could not find file 'C:\Program Files\Anywhere Software\B4A\libraries\android-database-sqlcipher-4.5.4.aar'.

I just put the configuration back as it was.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
You don't need to change the configuration, all you need to do is put android-database-sqlcipher-4.5.4.aar into Additional Libraries folder
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Put android-database-sqlcipher-4.5.4.aar into B4A folder

微信图片_20240629234607.png
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
1719683084945.png

layout file mainpage.bal is not used. Are you missing a call to Activity.LoadLayout? (warning #16)

That's the squiggly line hovered message.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Any chance my old dbbrowser download needs more than just the .aar file to function properly? I used your .aar file but maybe it's not compatible. My dbBrowser file was downloaded in 2022; seems suspect to me.
 
Upvote 0
Top