14
votes

The same issue was posted here but the answer given didn't work for me. I've uploaded to the store before and now I can't update my app to include some bug fixes. Whenever I try to upload the APK I get this error

Upload failed

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

I've tried adding Android:debuggable="false" to my manifest but I'm still getting the same message.

I'm currently using Android Studio to generate my signed APK.

Edit Here's my AndroidManifest.xml

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.aventuracctv.aventurafibercalculator"
        android:versionCode="3"
        android:versionName="1.2"
        android:debuggable="false">

        <uses-sdk
            android:minSdkVersion="7"
            android:targetSdkVersion="18" />

        <application
            android:allowBackup="true"
            android:icon="@drawable/app_icon"
            android:label="Fiber Calculator"
            android:theme="@style/AppTheme">

            <activity
                android:name="com.aventuracctv.aventurafibercalculator.MainActivity"
                android:label="@string/app_name" >

                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    </manifest>
7
Also, please post your AndroidManifest.xml.keyboardsurfer
Sorry about that, here you go.patrickSmith
Post your build.gradleGabriele Mariotti

7 Answers

26
votes

It seems you now have to explicitly set android:debuggable=false. (At least with the Android Studio 0.3.6.)

Debuggable is a property of the application tag. (Not the manifest tag.)

<application
            android:debuggable="false"

... more attributes

If you've added this attribute properly and Google Play still rejects your APK, try modifying build.gradle to set your own key for debug

signingConfigs {
    debug {
        storeFile file("my-keystore-file.jks")
        storePassword "my-password"
        keyAlias "my-alias"
        keyPassword "my-password"
    }
}
5
votes

Assuming you're using 'Build > Generate Signed APK' in Android Studio and assuming you're using Gradle, you will now have to configure Gradle to sign your apk. The reason being that button in Android Studio doesn't run 'gradle assembleRelease' which would make your apk non-debuggable.

Follow the instructions that pop up when you click on Generate Signed APK.

For Gradle-based projects, the signing configuration should be specified in the Gradle build scripts. Configure your signing configurations as described in the user guide: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Signing-Configurations

Then, run "gradle assembleRelease", and you will find your APK in the build/apk/ directory.

Hopefully Google either fixes the Generate Signed APK button in Android Studio or they revert the Play Store back to allow debuggable APKs again until they fix Gradle/Android Studio.

2
votes

You just have to set Build variants if you are on android studio.

Flow => Go to Build Variants -> From Build variant -> Select release mode

Here you just have to set the mode as release not debug.

NOTE : This is for security of your apk on google play store.

FOR NON-ANDROID-STUDIO users :

Here we just have to set the android:debuggable="false" in application tag of your menifest file and you are done.

And you are out of your issue.

Thanks and feel free to comment ...

0
votes

I think, that you have to set it as "false" in order to disable the debug.

0
votes

I assume that you have updated your android studio to 0.3.6.

check this one:

Android Studio generate signed apk not working on build 0.3.6 - Giving Error

and also as 6thSigma said: run "gradle assembleRelease"

0
votes

Google Play will not accept a debug version of your .apk file. You can only upload an .apk compiled as release version. Additionally it must be signed with your Android Developer key, which happens in the same step, at least if you're using Eclipse.

Make sure you distribute an .apk file which is your Signed Release version, as described here:

http://developer.android.com/tools/publishing/app-signing.html#releasecompile

-1
votes

In build.gradle(Module:app) make the debuggable as false

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