I am writing an android project, and trying to compile it for release. In my project i am using 3rd party projects such as couchbase-lite.
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
I want to use minifyEnabled=true in the gradle, but the signed APK fails to run, It appears to be a problem with couchbase using reflection and failing to find one of the properties...
Thank you!
You can exclude classes that are using reflection and may cause troubles at run time using -keep
rules in Proguard configuration file.
-keep public class com.example.somepackage.*
Using the rule above, all classes that match public class com.example.somepackage.*
are excluded from being minified and obfuscated.