我尝试将APK上传到Google Play上,并遇到了一条错误消息:“您上传了可辩论的APK。出于安全原因,您需要禁用调试,然后才能在Google Play发布之前。详细介绍可辩论的APKS。”

然后我写道android:debuggable="false"在我的清单中再次尝试。我遇到了相同的错误,因此我将构建变体从模块设置为释放,并尝试再次生成一个APK,但是这次,此错误将生成:

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

答案

我不建议关闭棉绒支票,而是因为某种原因。相反,请检查错误并修复。

错误报告保存到[app module]/build/reports/lint-results-yourBuildName-fatal.html

如果Gradle可以更清楚地在何处生成错误报告,那就太好了。

来自: stackoverflow.com