问题描述
我不知道为什么会这样,但是当我想运行一个项目时,出现此消息错误:
I don't know why it happen, but when I want to run a project, I get this message error :
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
项目,但运行该项目时总是遇到相同的错误.
I tried to clean / rebuild
project many times, but I got always same error when I run it.
build.gradle: http://pastebin.com/nnE9bpN7
build.gradle:http://pastebin.com/nnE9bpN7
请问您有什么解决方案吗?我真的很坚持.
Do you have any solutions please? I'm really stuck at that.
谢谢
推荐答案
compileSdkVersion'Google Inc.:Google APIs:23'
应该是 compileSdkVersion 23
.您正在通过依赖项添加Google Play服务.
compileSdkVersion 'Google Inc.:Google APIs:23'
is supposed to be compileSdkVersion 23
. You're adding Google Play services via dependencies.
libs
文件夹不应包含任何支持库,例如 support-v4
.这些再次作为Maven依赖项添加:
libs
folder is not supposed to contain any support libraries such as support-v4
. These are added again as a maven dependency:
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"
这篇关于Android:错误:任务':transformClassesWithJarMergingForDebug'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!