35

I Want to upload my apk to google play store.but its Show me error like this.

**You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play**

and than i searched for this and i receive suggetion to change the android:debuggable="false" in manifast.xml.

I changed like this

manifast.xml

 <application
    android:allowBackup="true"
    android:debuggable="false"
    android:icon="@mipmap/ic_launcher"
    android:label="Concall"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme" >

and in my build.grable(Module)

android {
buildTypes {
    debug {
        debuggable false
    }
}

1.is the enough for upload Apk to google play store?

2.if i pick up apk from my project folder(app>>build>>output>>apk>>apk-debug.apk) after this change than after it will able to upload in google play store??

mhsmith
  • 6,675
  • 3
  • 41
  • 58
RushDroid
  • 1,570
  • 3
  • 21
  • 46

7 Answers7

25

Don't use the debug variant output! Build a release apk. You can do that in Android Studio by going to the menu Build -> Generate Signed APK. Or by executing ./gradlew assembleRelease if you have properly configured signing in the build file.

niqueco
  • 2,261
  • 19
  • 39
  • Yes, remove all that. No need to deal with this "debuggable" thing anywhere. The "debug" build type will automatically be debuggable and the "release" build type will automatically be non-debuggable. – niqueco Aug 28 '15 at 06:16
  • yes i remove that.But apk ( picked up from app>>build>>output>>apk>>apk-debug.apk ) which i use to upload is the able to Upload to Play Store? @niqueco – RushDroid Aug 28 '15 at 06:21
  • No, you are not building a "release" version. The release version will be at app/app-release.apk ... It won't be inside build/output. Try the menu optjon I mention in the answer (you'll need to have signing set up already for this to work). – niqueco Aug 28 '15 at 06:24
  • @niqueco The release version will be at app/app-release.apk if you keep the default location value, but you can specify the location you want. – Jaime Montoya Mar 14 '17 at 15:11
  • @niqueco I have to debug the released .apk I have to check the issues in the app and want to export the offline DB from the published app from the client tablet. What should I do? – hasnain_ahmad Apr 23 '18 at 11:40
  • @hasnain_ahmad Sorry, I've never tried to debug a release apk. I've never had the need to do that. To export the db you can sideload the apk to the emulator and use Android Studio's "device file explorer" to navigate to the db file and get it. If you don't use the emulator I think Android will deny access to the file. – niqueco Apr 23 '18 at 23:59
15

I ran into this error and my application did not reference debuggable anywhere. After a little bit of searching, I found that I accidentally had testCoverageEnabled true in my release build type.

release {
    testCoverageEnabled true
    ...
}

Removing this resolved the issue.

dsrees
  • 6,116
  • 2
  • 26
  • 26
  • Ugh... mixture of happy to have finally found this, and frustration that some of the android gradle config is so unintuitive – Vin Norman May 11 '22 at 07:30
10

In my build.gradle file, I had debuggable = false and I was wondering why I'm getting this issue. later I found that it was debuggable = true in my AndroidManifest.xml file's application tag

Rahul Chaurasia
  • 1,601
  • 2
  • 18
  • 37
  • Thanks, that was makin' me crazy. I set it to false in the build.gradle and removed it from the build.gradle and still it said it was debuggable when I uploaded it. I don't know how long it would have taken without you answer. – Mark Dail Apr 06 '21 at 19:58
  • @MarkDail Glad it helps you. – Rahul Chaurasia Apr 07 '21 at 07:23
8

I was having the same problem. Unknowingly I kept

debuggable true in release buildType

buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }

After changed to false. Its working fine.

buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            debuggable false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }
Raja Jawahar
  • 6,742
  • 9
  • 45
  • 56
1

This should be the flags for uploading the Apk to Playstore. Not needed to be release build. If you want to test your qa build, you can do ./gradlew assembleQa with flags

minifyEnabled true
debuggable false
shrinkResources true
testCoverageEnabled = false
Wowo Ot
  • 1,362
  • 13
  • 21
yogikalwar
  • 81
  • 1
  • 3
1

This feature can be controlled from the manifest file also, disable from there

android:debuggable="false
Amit Gupta
  • 95
  • 1
  • 5
0

I was getting this warning when I wasn't selecting the "Signed" version.In the signed version, select release to deploy.

Non-signed "Debug" version vs. Signed version.

Jacksonsox
  • 1,114
  • 15
  • 25