読者です 読者をやめる 読者になる 読者になる

へんてこの何か

なにがし

AndroidStudio 0.4.0でgradle buildがlintで失敗する

環境

AndroidStudio 0.4.0
ADT 22
gradle 1.9

落ちた際のメッセージ

$ ./gradlew build #=> これを実行すると下が出る

:androidstudio_test:lint
Ran lint on variant release: 2 issues found
Ran lint on variant debug: 2 issues found
Wrote XML report to ***/androidstudio_test/build/lint-results.xml
Wrote HTML report to ***/androidstudio_test/build/lint-results.html
:androidstudio_test:lint FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':androidstudio_test:lint'.
> Lint found errors with abortOnError=true; aborting build.

解決法

build.gradleのandroid部分に以下を追記

android {
    etc....
    
    // これ追記
    lintOptions {
        abortOnError false
    }
}

参考

http://stackoverflow.com/questions/20699147/gradle-build-fails-on-lint-task