我有这个build.gradle文件。代码在Android Studio中构建得很好但是当我尝试在TeamCity上构建它时,我得到了这个例外:
进程退出代码1 [20:20:27] [步骤1/1] Gradle故障报告 [20:20:27] [Gradle failure report]失败:构建失败了 例外。 [20:20:27] [Gradle failure report] [20:20:27] [Gradle 失败报告] *出了什么问题:[20:20:27] [Gradle failure report] 任务':app:transformClassesWithDexForDebug'的执行失败。 [20:20:27] [Gradle failure report]> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:进程'命令 '/ usr / lib / jvm / java-8-oracle / bin / java''以非零退出结束 值1 [20:20:27] [Gradle failure reports]
这是我的build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
//buildToolsVersion "23.0.3"
buildToolsVersion "23.0.3"
testOptions {
unitTests.returnDefaultValues = true
}
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "com.aaaaaaaa.aaaa.aaaa"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
// jackOptions {
// enabled true
// }
}
buildTypes {
release {
shrinkResources true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g"
}
// compileOptions {
// targetCompatibility 1.8
// sourceCompatibility 1.8
// }
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
compile 'org.adw.library:discrete-seekbar:1.0.1'
compile 'com.github.jjobes:SlideDateTimePicker:v1.0.4'
compile 'com.google.guava:guava:19.0'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'com.github.alirezaaa:FilePickerLibrary:3.5.1'
compile 'net.gotev:uploadservice:3.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'io.reactivex:rxandroid:0.25.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.hkm.ui:ultimaterecyclerview:0.5.8'
compile 'com.mlsdev.rximagepicker:library:1.2.1'
compile 'com.google.android.gms:play-services:9.4.0'
}
我还需要在gradle文件中添加任何其他内容才能在TeamCity上构建它吗?