Lint found fatal errors while assembling a release target

前端 未结 9 792
庸人自扰
庸人自扰 2020-12-12 18:05

383/5000 I have an app that gives me compilation errors when I change it to release mode to upload it to the play store

I\'ve tried analyzing-inspecting code and I d

9条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 18:36

    1. You can use Analyze > Inspect Code menu to manually run inspections. The results appear in the Inspection Results window. This way you can view and fix the real issues.

    2. You can still view them from app\build\reports\lint-results-release-fatal.html file without using aforementioned manual inspection menu.

    3. Although it's not recommended you can also suppress the lint warnings by adding below code into your build.gradle as Android Studio suggests. But keep in mind that this will not fix any real issues.

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

提交回复
热议问题