SqlCipher Library size issue (~6.5 mb)

Hi, I am using this library for encrypting my database in android app, but it is increasing apk size by ~6.5 mb. I tried excluding .so files but it is working on top level module gradle file only. As I am having Db code on some other project and adding it as library in mine. How can I exclude so files from that library or is there any other way to reduce apk size.

Lib version : 4.5.0
Error : dlopen failed: library “libsqlcipher.so” not found
Gradle dependency used : net.zetetic:android-database-sqlcipher:4.5.0.

Hi @Vaibhav_Gupta

The libsqlcipher.so files represent SQLCipher compiled for specific architectures. On Android, we produce builds for armeabi-v7a, x86, x86_64, and arm64_v8a architectures. You can use abiFilters or APK Splits to either reduce the size of your APK, or generate multiple smaller APK’s, however, the former will limit the number of devices your application will run on.

1 Like

Hello @developernotes .
Is it same for commercial or enterprise plan? Isn’t there much difference between them for library size?

Hi @Jerry_Jeon

Both Commercial and Enterprise editions of SQLCipher for Android support the same architecture sets as our Community version in that regard.

1 Like