I have been working on one of android app which uses many native library including sqlcipher.so , so far i was working 32 bit app with 32 bit library .but as per client request we have created 64 bit version of our app then started integrating 32 bit and 64 bit but while integrated i am getting below error :
Earlier we were having 32 bit app with compiled sqlcipher.jar in libs folder with verison (v3.5.7-2-g188ecd7) and no aar package
Then one of our onsite Engineer created 64 bit version of same application by doing some changes in 32 bit code like he added aar package with version ( compile ‘net.zetetic:android-database-sqlcipher:3.5.9@aar’) – here he has kept everything only 64 bit like .so and ABI’s
Now it’s my job : i am started integrating 32 bit and 64 bit together by adding 32 bit related changes in to his created 64 bit application . In integrated code i am using 32 bit sqlcipher.so from 32 bit project and 64 bit sqlcipher.so which is already there in 64 bit project
I have added all respective ABI changes ( such as APP_ABI:=armeabi-v7a arm64-v8a) in respective .mk files to make it integrated code but while launching application app getting crashed.
In 64 bit code he has added net.sqlcipher source package in src/main/java with aar in build.gradle (he also kept uncompiled sqlcipher.jar in libs ) but in 32 bit code there were no net.sqlcipher package in src/main/java , there was only compiled sqcipher.jar in libs folder
We are not using progaurd ,we have below code in build.gardle for progaurd :
*Note – > Individual 32 bit and 64 bit application working fine , issue is happening only in integrated code while running on 32 bit device (Integrated code working fine for 64 bit device)
This appears as if you are using ProGuard with your release build. Would you try disabling that to see if it makes a difference?
Also, according to your screenshot, you are bundling individual libsqlcipher.so files. If you are referencing the AAR package, you would not need to do this as it will contain both 32 and 64-bit native libraries along with the necessary Java library. Can you remove your local inclusion of the .so and .jar files?
This is the default packaging option now for SQLCipher for Android, which makes for easier upgrades/packaging. If you still have both the individual native libraries/jar and the AAR reference it may likely be causing the problem you are experiencing.
Our App has native code dependency so first we build native code and put generated libraries (.so’s ) in App project
Our native code also has dependency over sqlcipher hence they might kept individual sqlcipher.so files at various path so that native code could reference it .
As per your guidance i had removed all libsqlcipher.so from all respective path but while building native code it’s getting failed
As you said if we put AAR package we don’t need to use any extra sqlcipher.so individually , hence could you please guide how to use AAR in order to resolve this dependency from native code
currently we are referring .so from Android.mk of native code as below :
Please give me way how to refer AAR in order to utilize it’s .so
Note : As our inidvidual 64 bit app working fine because they are using AAR as well as they have put .so to respective path in order to referred by native code (here our developer hasn’t put aar in app/lib also - as it is mentioned on zenetic site that there should aar inside app/lib )
So I am not sure how to utilize sqlcipher@aar , as our app having customized use of sqlcipher.so
Unfortunately, due to the varying complexity of situations like this we do not provide public support for custom integration scenarios. If your organization is using SQLCipher in a commercial capacity, please feel free to reach out privately via support@zetetic.net to discuss advanced support agreements.