持续集成 Jenkins+Gradle+SVN 构建遇见的问题

董永 · 2016年03月24日 · 最后由 冰渣儿 回复于 2016年04月11日 · 1384 次阅读

1.在使用 Gradle 构建时遇见的问题

(1)在配置文件中开始选择的方式是如图:

但是在构建的过程中始终会爆出一个错误:

:library:lint FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':library:lint'.
> Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
    lintOptions {
        abortOnError false
    }
}
...

在 IMKit 和 app 的目录下的 build.gradle 文件中添加了该段代码还是始终会报错,不知道是什么原因。

(2)后来在网上看到一篇文章按照文章中的提示修改了配置文件的内容,如图:

然后进行构建,就会成功。哪位大神能告诉我使用第一种方法进行构建为什么会报这个错呢,多谢 !

顺便把我看到的那篇文章的链接粘贴到这里 enter link description here

共收到 3 条回复 时间 点赞

把那两个 build.gradle 内容放上来看看?

在 app 下的 build.gradle 添加,我的 build.gradle 如下:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "xposed.doctorq.com.decode2"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.2.1'
}

提示很清楚了 lint 报告错误了 没有继续往下走 ,你设置一下 lintOptions { abortOnError false } 就可以了

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册