生成签名的APK时出现':app:lintVitalRelease'错误 [英] ':app:lintVitalRelease' error when generating signed apk

查看:444
本文介绍了生成签名的APK时出现':app:lintVitalRelease'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将我的apk上传到Google Play上,并遇到错误消息:您上传了可调试的APK.出于安全原因,您需要先禁用调试功能,然后才能将其发布到Google Play中.了解有关可调试APK的更多信息."

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

然后我在清单中写了android:debuggable="false",然后重试.我遇到了相同的错误,因此我将模块的build变体设置为release,并尝试再次生成apk,但是这次生成了此错误:

Then I wrote android:debuggable="false" in my manifest and tried again. I've encountered the same error, so I've set the build variant from my module to release and tried generated an apk again, but this time, this error is generated:

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 wouldn't recommend turning off the lint checks, they're there for a reason. Instead, check what the error is and fix it.

错误报告将保存到[app module]/build/reports/lint-results-yourBuildName-fatal.html.您可以在浏览器中打开此文件以了解错误.

The error report is saved to [app module]/build/reports/lint-results-yourBuildName-fatal.html. You can open this file in a browser to read about the errors.

如果Gradle可以更清楚地说明错误报告的生成位置,那就太好了.

It would be nice if Gradle could make it a little more clear where the error report is generated.

这篇关于生成签名的APK时出现':app:lintVitalRelease'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆