Google Play says my APK built with Android Studio Build->Generate Signed APK is debuggable

11,777

Solution 1

With a powerful gradle build system in android studio you can do it without even touching your code. You can also make your debug build with debuggable false to test what differences are

  buildTypes {

      debug {
         runProguard false/true
         proguardFile getDefaultProguardFile('proguard-android.txt')
         debuggable false/true

      }

      release {
         runProguard true/false
         proguardFile getDefaultProguardFile('proguard-android.txt')
         debuggable false/true

      }
  }

Power of Gradle.

Note : You wont be able to see the process in the left pane of DDMS under device info even the application running in device, if it has debuggable false in build configuration.

Solution 2

If you have the tag android:debuggable="true" in your application manifest, or if you don't have it in, try changing it/putting this in your application manifest tag:

 android:debuggable="false"

Solution 3

Check DEBUG value in BuildConfig.java file in gen folder. Sometime if we are not doing clean build this value remains true.

Best is to do a clean release build.

Share:
11,777
Admin
Author by

Admin

Updated on July 21, 2022

Comments

  • Admin
    Admin almost 2 years

    I get the message: You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. Learn more about debuggable APKs.

    I generate my APK with Android Studio, Build->Generate Signed APK. I created a Keystore.

  • hichris123
    hichris123 over 10 years
    @zyngawow It looks like for some versions of Android Studio you must explicitly define it. Not sure why.
  • TacoEater
    TacoEater about 10 years
    Not applicable when using Gradle.
  • MattPark
    MattPark almost 10 years
    Where exactly do you make this change?
  • Piyush Agarwal
    Piyush Agarwal almost 10 years
    it is inside the module's build.gradle file, debug and release are the default build types included in each project created/imported in Android Studio.
  • MattPark
    MattPark almost 10 years
    got it thanks-- I thought I opened up everything. Missed that one