【发布时间】:2016-04-18 11:05:48
【问题描述】:
错误:任务 ':app:transformClassesWithDexForDebug' 执行失败。
com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'/Library/Java/JavaVirtualMachines/jdk1。 8.0_77.jdk/Contents/Home/bin/java'' 以非零退出值 2 结束
我该怎么办? 我在库中没有多个 firebase-client 副本。它只存在于外部库中。
我的依赖:
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:support-v4:23.2.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.firebase:firebase-client-android:2.5.2+'
【问题讨论】:
-
这种情况曾经发生在我身上,我的项目有很多外部库,我已经超过了 64k 的限制。我启用了multidex,配置了一个proguard文件并将minifyEnabled设置为true(用于调试和发布模式),然后问题就解决了。希望这也能解决您的问题。
-
试试这个依赖依赖{ compile 'com.firebase:firebase-client-android:2.5.2' }
-
去掉+号...重建你的项目
-
@ExceptionLover: 这是我的依赖项
-
pooja,我编辑答案并改进