2016-02-02 52 views
2

我不知道为什么会发生,但是当我想运行一个项目,我得到这个消息的错误:安卓:错误:执行失败的任务“:transformClassesWithJarMergingForDebug”

Error:Execution failed for task ':transformClassesWithJarMergingForDebug'. 
> com.android.build.api.transform.TransformException: 
java.util.zip.ZipException: duplicate entry: android/support/v4/app/FragmentContainer.class 

我试图clean/rebuild项目多次,但我运行它时总会遇到同样的错误。

的build.gradle: http://pastebin.com/nnE9bpN7

你有什么解决方案吗?我真的被困在那。

感谢

+0

你的build.gradle文件的内容是什么? – Jure

+0

我已添加它:http://pastebin.com/nnE9bpN7 – Zeta

+0

你是否在libs文件夹中添加manualy任何支持库? – JpCrow

回答

2

compileSdkVersion 'Google Inc.:Google APIs:23'应该是compileSdkVersion 23。您正在通过依赖关系添加Google Play服务。

libs文件夹不应该包含任何支持库,如support-v4。这些被添加为maven依赖:

compile "com.android.support:support-v4:23.1.1" 
compile "com.android.support:appcompat-v7:23.1.1" 
compile "com.android.support:design:23.1.1" 
+0

完美的是,我的问题是这样的:编译fileTree(包括:'* .jar',dir:'libs')我用compile'c​​om.android.support:support-v4:23.1.1'取代了它,而不是加载手动罐子 – Zeta

相关问题