-2

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
        }
}
Nick Bapu
  • 463
  • 1
  • 4
  • 14
Reddy
  • 65
  • 1
  • 10

1 Answers1

1

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.

  • Thanks for the answer. Could you please share the link on what error does play console throw? i generated both apks with and without ```debuggable``` as true. size is same. – Reddy May 15 '19 at 17:28
  • @Reddy you can check this link: https://stackoverflow.com/questions/32263949/you-uploaded-a-debuggable-apk-for-security-reasons-you-need-to-disable-debuggin – Vikas Malhotra May 15 '19 at 17:34
  • Thank you so much @VikasMalhotra – Reddy May 15 '19 at 20:44