Ad

Publishing A Release Apk With Debuggable True

I would like to publish a a library with debuggable true on release build types. This would help me debug that library. What are the potential problems if this library goes into production? Is it secure ? What difference does it make when released with debuggable as false?

buildTypes {
        release {
            minifyEnabled true
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
}
Ad

Answer

First of all, you can not publish an apk with debuggable set to true.

Google play console will give you an error just after you upload the apk.

Secondly, it is not secure at all. Your apk will be very slow.

There are differences in a debug build and a release build. Release builds are much faster. Release builds do not print logs (it is a good practice to not print logs in release builds) which makes execution slower as it takes time to print the characters in the console and all print commands are usually in sync.

Moreover, a release build may also trigger code obfuscation and splits.

Ad
source: stackoverflow.com
Ad