Unable to Upload Updated APK to Google Play Store

眉间皱痕 提交于 2019-12-19 05:14:30

问题


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>

回答1:


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"
    }
}



回答2:


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.




回答3:


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 ...




回答4:


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




回答5:


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"




回答6:


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




回答7:


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
    }
}


来源:https://stackoverflow.com/questions/20051192/unable-to-upload-updated-apk-to-google-play-store

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!