For some reason I have to run my Android App in release mode.I have to run through the code when running the app just like we use in debug mode. My break points are not hitting when I run in release mode, I have added android:debuggable="true"
in manifest. Still the breakpoint is not hitting. Any help.
Thanks in Advance
It means you have to give sign build in debug version also in build gradle. So It will have the same sign as release build and you can debug when it runs.
In your gradle file, you must add debuggable ability in your release flavor.
buildTypes { release { debuggable true minifyEnabled false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } debug { debuggable true minifyEnabled false applicationIdSuffix '.debug' } }
signingConfig
is release configuration it must be added in gradle file in android{} block, something like this:
signingConfigs { release { keyAlias 'YourAppKey' keyPassword 'somePassword' storeFile file('appkeyfile.jks') storePassword 'somePassword' } }
In my case, I have created the debug configuration same as previous release build and started debugging. It means you have to give sign build in debug version also in build gradle.
signingConfigs { config { keyAlias 'abc' keyPassword 'xyz' storeFile file('<<KEYSTORE-PATH>>.keystore') storePassword 'password' } } buildTypes { debug { debuggable true signingConfig signingConfigs.config proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } }
So It will have the same sign as release build and you can debug when it runs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With