App Crashed When I Build A Signed Apk With Jsoup
My android app was crashing when i build a signed apk. The crash was not seen when i did a debug build. The build.gradle file is like this: buildTypes { release {
Solution 1:
setting minifyEnabled to false is not the correct solution, that would disable proguard while building the release version
The reason why setting minifyEnabled is working is because proguard might be obfuscating jsoup.
So, you should keep minifyEnabled as true and include these rules for jsoup in your proguard-rules.txt file to prevent the app from crashing :
-keep publicclassorg.jsoup.** {
public *;
}
Solution 2:
What i did to prevent the app from crashing is that i have made minifyEnabled to false from true in the build.gradle file. In that file i have made the following change.
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
debuggable true
}
}
If anybody have any other answers please post it here.
Post a Comment for "App Crashed When I Build A Signed Apk With Jsoup"