今天引用了一个module,这个module里有引用v4包,导致运行的时候报错:
Error:Execution failed for task ':app:transformClassesWithJarMergingForBaiduDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/internal/view/SupportSubMenu.class
在网上找到了这个解决办法,在此记录一下:
allprojects {
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
}
这个错也是包冲突,解决办法类似
Error:Execution failed for task ':app:transformClassesWithJarMergingForBaiduDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/ColorRes.class
allprojects {
configurations {
all*.exclude group: 'com.android.support', module: 'support-annotations'
}
}
1. 问题描述Error:The number of method references in a .dex file cannot exceed 64K.
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.> 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 'C:\Program Files\Java\jdk1.8.0_77\bin\java.exe'' finished with non-zero exit value 2‘’?这个问题在这里找到了解决方案:http://blog.csdn.net/sjzx3142/article/details/51376601