2015-11-02 43 views
3

我试着运行我的体型时,收到此错误:Jar合并调试投掷重复条目与Android?

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

,这里是我的build.gradle

dependencies { 
     compile fileTree(dir: 'libs', include: ['*.jar']) 
     testCompile 'junit:junit:4.12' 
     compile 'com.android.support:appcompat-v7:23.1.0' 
     compile 'com.android.support:design:23.1.0' 
     compile('com.digits.sdk.android:digits:[email protected]') { 
      transitive = true; 
     } 
     compile 'com.parse.bolts:bolts-android:1.+' 
     compile 'com.parse:parse-android:1.+' 
     compile 'com.android.support:cardview-v7:23.1.0' 
     compile 'me.zhanghai.android.materialprogressbar:library:1.0.2' 
     compile 'com.android.support:support-v4:23.1.0' 
     compile 'com.google.android.gms:play-services-identity:8.1.0' 
     compile 'com.google.android.gms:play-services-plus:8.1.0' 
     compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' 
     compile 'com.anjlab.android.iab.v3:library:[email protected]' 
    } 

这里是我的库的PIC

enter image description here

林希望这里的某个人能帮我找出问题所在。我使用android studio。

回答

4

尝试排除support-v4因为google-play-services已经包含了support-v4

compile ('com.google.android.gms:play-services:8.1.0') 
{ 
    exclude group: 'com.android.support', module: 'support-v4' 
} 

,如果它不能正常工作, 清洁工程和重建。

否则,尝试在gradle这个文件

defaultConfig { 
    multiDexEnabled true 
} 
+0

工作,我感谢设置multiDexEnabled