Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard configuration for sqlite android bindings

Tags:

I am trying to use SQLite android bindings to have a custom encrypted SQLite DB in my android app. It all works fine and I am about to publish my app. I am trying to use ProGuard for code obfuscation and compression but does not seem to work fine with SQLite android bindings. My released app crashes on startup because it cannot find few .so files used by SQLite. I am not sure what should be the correct ProGuard rule to keep those libraries.

Right now I have added only this to my ProGuard:

-keep class org.sqlite.**
like image 259
Sourabh86 Avatar asked Aug 04 '16 04:08

Sourabh86


1 Answers

Usually,

-keep class org.sqlite.** { *; }
-keep class org.sqlite.database.** { *; }

would do the trick.

Verify your mapping.txt for what ProGuard is already done, and make sure that your models are not got renamed. If so, you may need

-keep class com.your.modelspackage.**
-keepclassmembers com.your.modelspackage.** { *; }  

Hope it helps

like image 181
Let'sRefactor Avatar answered Sep 25 '22 16:09

Let'sRefactor