Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

':app:lintVitalRelease' error when generating signed 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."

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
      }
  }
  ...
like image 843
user3716366 Avatar asked Sep 28 '22 06:09

user3716366


People also ask

Where is generated signed APK?

The Signed APK file is named app-release. You will find it in your project folder in the app/release directory.


2 Answers

I wouldn't recommend turning off the lint checks, they're there for a reason. Instead, check what the error is and fix it.

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.

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

like image 444
Graydyn Young Avatar answered Oct 22 '22 16:10

Graydyn Young


I had this problem and solved it by adding:

lintOptions { 

    checkReleaseBuilds false

}

to my build.gradle file within the android{ } section.       

like image 219
naile Avatar answered Oct 22 '22 15:10

naile