Android studio 编译问题: finished with non-zero exit value 2
合作开发,一个星期没有更新代码了,已更新编译就出现这个问题,不知道别人提交了多少东西,导致出现这个问题。
错误内容:
Error:Execution failed for task ‘:androidShopNC2014Moblie:transformClassesWithDexForDebug’.
>
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:
Process ‘command ‘/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java” finished with non-zero exit value 2
解决方案:
这个错误在app的build.gradle里面添加下面这句就好了。
android {
defaultConfig {
multiDexEnabled true
}
...
}