1. 程式人生 > >ANDROID打包錯誤ERROR:EXECUTION FAILED FOR TASK ´:APP:LINTVITALRELEASE´.

ANDROID打包錯誤ERROR:EXECUTION FAILED FOR TASK ´:APP:LINTVITALRELEASE´.

follow ring car 疑問 sdk tools error: while 改善

來自:http://dditblog.com/itshare_657.html

今天修改之前的項目之後、準備打包的時候、一起打包不了、一直提示有問題、錯誤是一些什麽Strings.xml裏面的一些信息、有點看不懂、我也有嘗試著改一下string.xml裏面報錯的地方、但仍然還是打包不了、然後往下翻的時候看到最後的提示消息如下

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

解決方案

其實解決方案已經提示出來了、就是在對應的項目build.gradle裏面添加一個配置、在app的build.gradle裏的android{}中添加如下代碼、然後再次運行Generate Signed Apk就正常了

android {
    compileSdkVersion 23
    buildToolsVersion ´25.0.0´

    defaultConfig {
        applicationId "com.luzhiyao.sgongdoocar"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 5
        versionName "1.1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFileproguard-android.txt´), ´proguard-rules.pro´
        }
    }

    //添加如下配置就ok
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

若資源對你有幫助、瀏覽後有很大收獲、不妨小額打賞我一下、你的鼓勵是維持我不斷寫博客最大動力

想獲取DD博客最新代碼、你可以掃描下方的二維碼、關註DD博客微信公眾號(ddblogs)

或者你也可以關註我的新浪微博、了解DD博客的最新動態:DD博客官方微博(dwtedx的微博)

如對資源有任何疑問或覺得仍然有很大的改善空間、可以對該博文進行評論、希望不吝賜教

為保證及時回復、可以使用博客留言板給我留言: DD博客留言板(dwtedx的留言板)

感謝你的訪問、祝你生活愉快、工作順心、歡迎常來逛逛

ANDROID打包錯誤ERROR:EXECUTION FAILED FOR TASK ´:APP:LINTVITALRELEASE´.