Google Play says my APK built with Android Studio Build->Generate Signed APK is debuggable
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.
Admin
Updated on July 21, 2022Comments
-
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 over 10 years@zyngawow It looks like for some versions of Android Studio you must explicitly define it. Not sure why.
-
TacoEater about 10 yearsNot applicable when using Gradle.
-
MattPark almost 10 yearsWhere exactly do you make this change?
-
Piyush Agarwal almost 10 yearsit 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 almost 10 yearsgot it thanks-- I thought I opened up everything. Missed that one