Android:错误:任务';的执行失败:应用程序:使用Jarmergingfordebug和x27转换类;

Android:错误:任务';的执行失败:应用程序:使用Jarmergingfordebug和x27转换类;,android,android-studio,android-gradle-plugin,build.gradle,Android,Android Studio,Android Gradle Plugin,Build.gradle,尝试运行项目时出现错误 Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/DimenRes.class 这是我的体形。gradle

尝试运行项目时出现错误

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/DimenRes.class
这是我的体形。gradle

apply plugin: 'com.android.application'



 android {
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion "24.0.0"
    compileOptions.encoding = 'windows-1251'
    defaultConfig {
        applicationId "org.radiomango.app"
        minSdkVersion 11
        targetSdkVersion 23
        multiDexEnabled true
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    }

    dexOptions {
        javaMaxHeapSize "4g"
        preDexLibraries = false
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles 'proguard.cfg'
        }
    }
    }

    dependencies {
    compile 'com.google.code.gson:gson:2.2.2'
    compile files('libs/acra-4.5.0.jar')
    compile files('libs/android-support-v13.jar')
    compile files('libs/org.apache.commons.httpclient.jar')
    compile files('libs/org.apache.http.legacy.jar')
    compile project(':seekArc_library')
    compile project(':socialauthandroid')
    compile project(':SwipeMenuListView')
    compile 'com.android.support:design:24.0.0'

}
我试图清理这个项目

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/DimenRes.class
构建->清理

然后重建,但没有效果

i同步并清理项目,仍然没有结果

最后我重新启动了android studio,但问题仍然令人兴奋


有人能帮我吗

我想这是因为你使用了
编译文件('libs/android-support-v13.jar')
编译'com.android.support:design:24.0.0'
可能是因为这个库相互冲突

排除在两者中通用的库部分。 使用
排除
e、 g


我认为这是因为您使用
编译文件('libs/android-support-v13.jar')
编译'com.android.support:design:24.0.0'
可能是因为此库相互冲突

排除在两者中通用的库部分。 使用
排除
e、 g

替换

compile files('libs/android-support-v13.jar')
compile files('libs/android-support-v13.jar')

您添加了设计库,它还利用了support-v4库。如果您通过maven dependency添加了这两个选项,则应由gradle处理。

Replace

compile files('libs/android-support-v13.jar')
compile files('libs/android-support-v13.jar')

您添加了设计库,它还利用了support-v4库。如果您通过maven dependency添加了这两个选项,则应由gradle处理。

Replace

compile files('libs/android-support-v13.jar')
compile files('libs/android-support-v13.jar')

在gradle中应用此选项,同时添加包装选项

替换

compile files('libs/android-support-v13.jar')
compile files('libs/android-support-v13.jar')

在gradle中应用此选项,同时添加包装选项


我试着像compile('com.android.support:design:24.0.0'){exclude module:'support-v4'}但是仍然在那里发出铰孔@Dipali shahI我试着像compile('com.android.support:design:24.0.0'){exclude module:'support-v4'}但是在我添加了另一个zip表达式之后仍然在那里发出铰孔@Dipali shah“重复条目:android/support/annotation/IntegerRes.class“@ChristopherThen你应该看看你的依赖关系图。在终端上执行./gradlew app:dependencies以获取项目依赖项列表。通过此列表,您可以检查哪些库正在使用support-v4功能。我应该在cmd中给出执行此命令的路径@ChristopherRafter i add获得另一个zip表达式异常“duplicate entry:android/support/annotation/IntegerRes.class”@Christopher您应该看看依赖关系图。在终端上执行./gradlew app:dependencies以获取项目依赖项列表。通过此列表,您可以检查哪些库正在使用support-v4功能。在cmd中执行此命令@Christopher时,我应该给出什么路径