Lint found fatal errors while assembling a release target

前端 未结 9 751
庸人自扰
庸人自扰 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:31

    Make sure you defined all the translations in all the string.xml files in your application.

    0 讨论(0)
  • 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
        }
    }
    
    0 讨论(0)
  • 2020-12-12 18:37

    This works for me

    lintOptions { 
        checkReleaseBuilds false
    }
    

    Add this code into the build.gradle file within android {} section

    0 讨论(0)
提交回复
热议问题