How to get release build apk file using proguard
add this:
-dontwarn com.squareup.okhttp.**
to your proguard-rules.pro
How to get ProGuard mapping file of previous release build
The mapping file is overwritten after every build so you probably lost it for good.
The best approach I can think of would be versioning your code with some VCS (Git, for example) and moving the mapping file to a location that is not being gitignored.
To move the generated proguard mapping file to a different path check this answer. You can even rename it if you like.
Cannot build release apk with proguard
The problem was in the path to proguard-rules
Changed this piece of code
proguardFiles getDefaultProguardFile('proguard-android.txt'), '$project.rootDir/tools/proguard-rules.pro'
To this
proguardFiles getDefaultProguardFile('proguard-android.txt'), '../tools/proguard-rules.pro'
Unable to generate release Build apk
read this topic
And this one
While reading the info message, it gives me an idea about this Conscrypt
and did a research and found out that I need to install conscrypt
to my gradle.app
implementation 'org.conscrypt:conscrypt-android:2.2.1'
and it works.
Android apk release build fails with proguard
It was just the ProGuard minifyEnabled flag set to true causing an issue. Setting the flag to false allows for the build to be signed and released to the playstore. I'm sure I'll re-enable it once I know how to debug issues with it.
build.gradle
buildTypes {
debug {
debuggable true
jniDebuggable false
renderscriptDebuggable true
zipAlignEnabled true
}
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
renderscriptOptimLevel 3
minifyEnabled false
pseudoLocalesEnabled false
zipAlignEnabled true
}
}
Identifying errors in Release build of Android application
Proguard comes with certain problems but it works great for minifying the apk size. I will suggest that if you are using third party libraries in your app then use their proguard-rules as well in proguard-rules file.
To get error from signed apk use Fabric Crashlytic. Its easy to integrate(10 minute max) and it will show the complete stacktrace of exception on your fabric console .
Library resources get removed from folder and renamed on release
This was a rookie mistake. It had nothing to do with proguard or gradle. The issue came in when I had refactored the package name through File => Project Structure. It refactored everything except the release AndroidManifest so the app was trying to pull the resources from the wrong place on a release.
Related Topics
Kotlin: Whats Does "Return@" Mean
Using Android Intent.Action_Send for Sending Email
How to Get Child of Child Value from Firebase in Android
Custom Uri Schemes for the Facebook Messenger
How to Find the Logs on Android Studio
Work Around Canvas.Clippath() That Is Not Supported in Android Any More
Sharing a Png Image in Drawable Folder
Differencebetween @Id and @+Id
Search in Listview with Edittext
Get the Distance Between Two Geo Points
What Do Gc_For_Malloc, Gc_Explicit, and Other Gc_* Mean in Android Logcat
How to Delete SQLite Database from Android Programmatically
Android N Requires the Ide to Be Running with Java 1.8 or Later
Android Split Action Bar with Action Items on the Top and Bottom
How to Set a Viewpager Inside a Fragment
Auto-Scrolling Textview in Android to Bring Text into View
Textinputlayout Not Showing Edittext Hint Before User Focus on It