无法将更新的APK上传到Google Play商店

pat*_*ith 14 android apk google-play android-studio

这里发布同样的问题,但给出的答案对我不起作用.我之前已经上传到商店,现在我无法更新我的应用程序以包含一些错误修复.每当我尝试上传APK时,我都会收到此错误消息

上传失败

您上传了可调试的APK.出于安全原因,您需要先禁用调试,然后才能在Google Play中发布.

我已经尝试将Android:debuggable ="false"添加到我的清单中,但我仍然收到相同的消息.

我目前正在使用Android Studio生成我签名的APK.

编辑这是我的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>
Run Code Online (Sandbox Code Playgroud)

Sha*_*ley 26

看来你现在必须明确设置android:debuggable = false.(至少使用Android Studio 0.3.6.)

Debuggable是应用程序标记的属性.(不是清单标签.)

<application
            android:debuggable="false"

... more attributes
Run Code Online (Sandbox Code Playgroud)

如果您已正确添加此属性且Google Play仍拒绝您的APK,请尝试修改build.gradle以设置您自己的密钥以进行调试

signingConfigs {
    debug {
        storeFile file("my-keystore-file.jks")
        storePassword "my-password"
        keyAlias "my-alias"
        keyPassword "my-password"
    }
}
Run Code Online (Sandbox Code Playgroud)

  • 你必须使用构建Variant = Release(不是调试) (3认同)
  • 谢谢!我以为我已经在应用程序标签中尝试了它,但我想它并没有完成. (2认同)

小智 5

假设您在Android Studio中使用"Build> Generate Signed APK"并假设您正在使用Gradle,那么您现在必须配置Gradle来签署您的apk.原因是Android Studio中的按钮不运行'gradle assembleRelease',这将使您的apk不可调试.

按照生成签名APK时弹出的说明进行操作.

对于基于Gradle的项目,应在Gradle构建脚本中指定签名配置.按照用户指南中的说明配置签名配置:http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Signing-Configurations

然后,运行"gradle assembleRelease",您将在build/apk /目录中找到您的APK.

希望Google能够修复Android Studio中的Generate Signed APK按钮,或者将Play商店还原为允许再调试APK,直到他们修复Gradle/Android Studio.