生成签名的apk时出错 [英] Error when generate signed apk
问题描述
我尝试将我的APK上传到Google Play,并遇到了一条错误消息:您上传了一个可调试的APK。出于安全原因,您需要先停用调试,然后才能在Google Play中发布。 然后我在我的清单中写了 android:debuggable =false
,然后再次尝试。我遇到了同样的错误,所以我已经从我的模块中安装了构建变体来释放并再次生成一个apk,但是这样会产生这个错误:
错误:Gradle:任务执行失败':app:lintVitalRelease'。
在组装发布目标时,Lint发现致命错误
要继续,请修复由lint或修改您的构建脚本,如下所示:
...
android {
lintOptions {
checkReleaseBuilds false
//或者,如果您愿意,您可以继续检查发布版本中的错误,
//但是在发现错误时继续构建:
abortOnError false
}
}
...
我遇到了这个问题,
lintOptions {
$ b $ checkReleaseBuilds false
}
到我的构建.grade 文件在
android {}
部分。
I've tried to upload my apk on google play and encountered an error message: "You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. Learn more about debuggable APKs."
Then I wrote android:debuggable="false"
in my manifest and tried again. I've encountered the same error, so I"ve seted the build variant from my module to release and generate an apk again, but this, generated this error:
Error:Gradle: Execution failed for task ':app:lintVitalRelease'.
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
I had this problem and worked around it by adding
lintOptions {
checkReleaseBuilds false
}
to my build.grade
file within the android{ }
section.
这篇关于生成签名的apk时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!