transformClassesWithDexForDebug

gradle编译项目报错:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

 

Error:Execution failed for task ':presentation:transformClassesWithJarMergingForDebug'.

> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/xxx/BuildConfig.class

。。。。各种尝试

原因:

ModuleA 包名 com.p.a

ModuleB 包名 com.p.b

竟然是ModuleB中的test包下面测试包名是com.p.a

ModuleB重命名包的时候疏忽没修改掉test包的包名

好大的坑。。。

 

posted on 2016-03-15 23:34  屁屁侠  阅读(3314)  评论(0编辑  收藏  举报

导航