同样的问题已发布here,但给出的答案对我不起作用。我之前已经上传到商店,现在我无法更新我的应用程序以包含一些错误修复。每当我尝试上传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>
答案 0 :(得分:26)
现在看来你必须明确设置 android:debuggable = false 。 (至少使用Android Studio 0.3.6。)
Debuggable是应用程序标记的属性。 (不是清单标签。)
<application
android:debuggable="false"
... more attributes
如果您已正确添加此属性且Google Play仍然拒绝您的APK,请尝试修改build.gradle以设置您自己的调试密钥
signingConfigs {
debug {
storeFile file("my-keystore-file.jks")
storePassword "my-password"
keyAlias "my-alias"
keyPassword "my-password"
}
}
答案 1 :(得分:5)
假设您正在使用'Build&gt;在Android Studio中生成签名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。
答案 2 :(得分:2)
如果你在android studio上,你只需要设置Build变种。
Flow =&gt; 转到Build Variants - &gt;来自Build变体 - &gt;选择发布模式
这里你只需要将模式设置为release而不是debug。
注意:这是为了保护您在Google Play商店中的apk。
FOR NON-ANDROID-STUDIO用户:
在这里,我们只需要在你的清单文件的应用程序标签中设置 android:debuggable =&#34; false&#34; 即可。
你不在问题之中。
谢谢你,随时评论......
答案 3 :(得分:0)
我认为,您必须将其设置为“false”才能禁用调试。
答案 4 :(得分:0)
我假设您已将Android工作室更新为0.3.6。
检查一下:
Android Studio generate signed apk not working on build 0.3.6 - Giving Error
还有6thSigma说:运行“gradle assembleRelease”
答案 5 :(得分:0)
Google Play不接受.apk文件的调试版本。您只能上传编译为发行版的.apk。此外,它必须使用您的Android Developer密钥签名,这在同一步骤中发生,至少在您使用Eclipse时。
确保分发一个.apk文件,该文件是您的签名版本,如下所述:
http://developer.android.com/tools/publishing/app-signing.html#releasecompile
答案 6 :(得分:0)
在build.gradle(Module:app)中,将debuggable设为false
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable false
}
}