I am using Navigation Architecture.
For debug build :
debug {
debuggable true
minifyEnabled false
useProguard false
}
and For release build :-
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
But I need to show back icon in place of hamburger icon in release build.
I ran into this, I inspected logs and found an error that suggested something went wrong with obfuscation of hamburger/back arrow drawable in the toolbar. It said something like - startAnimation
method could not be found.
Now I dont really know whats the real problem behind it, I just added these lines in proguard file and it worked again:
-keep class androidx.appcompat.app.ActionBarDrawerToggle{}
-keep class androidx.appcompat.graphics.drawable.DrawerArrowDrawable{ *; }