1. 程式人生 > >Error:Execution failed for task ':app:lintVitalRelease'. > java.lang.IllegalStateException:

Error:Execution failed for task ':app:lintVitalRelease'. > java.lang.IllegalStateException:

Error:Execution failed for task ‘:app:lintVitalRelease’. > java.lang.IllegalStateException: Expected a name but was STRING at line 1 column 99 path $[0].apkInfo.versionName

在AndroidStudio中開啟之前的應用,並執行簽名打包時,會報以上錯誤,終結的解決辦法是在build.gradle中的android中新增以下內容:

 lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }