【发布时间】:2016-10-01 09:24:10
【问题描述】:
我正在开发一个安卓应用程序。在外部库spoon-runner-1.7.0-jar-with-dependencies.jar 中使用后,当我尝试执行应用程序结果时添加此错误:任务':app:transformClassesWithMultidexlistForDebug'的执行失败。
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1 .8.0_51\bin\java.exe'' 以非零退出值 1 结束`
我的 gradle 文件如下所示
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "venki.testapp"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
incremental = true;
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile files('libs/spoon-runner-1.7.0-jar-with-dependencies.jar')
}
1.我已经尝试清理项目和重建项目。 2. 并且使缓存无效并重新启动android studio。 3. 增加堆大小。 **4.**android:name="android.support.multidex.MultiDexApplication"
对我没有任何帮助。请帮我解决这个问题。
【问题讨论】:
-
删除行 compile fileTree(include: ['*.jar'], dir: 'libs') 并尝试一下
-
删除该行后结果相同
标签: java android android-studio