2017-05-28 120 views
0

当我运行我的应用程序时,我得到这些错误是指向图形/绘图的东西。我通过各种网站搜索,但没有任何解决方案。Android Studio错误:执行失败的任务':应用程序

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

这里是我的build.gradle文件

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 

    defaultConfig { 
     applicationId "com.example.rajkumar.layout" 
     minSdkVersion 19 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 

    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/license.txt' 
     exclude 'META-INF/notice.txt' 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 
     'proguard-rules.pro' 
     } 
    } 

    configurations { 
     all*.exclude group: 'com.android.support', module: 'support-v4' 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-  
core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support:support-v4:23.0.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'gr.pantrif:easy-android-splash-screen:0.0.1' 
compile 'com.felipecsl:gifimageview:2.1.0' 
compile 'commons-io:commons-io:2.4' 
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.17' 
testCompile 'junit:junit:4.12' 
compile files('libs/activation.jar') 
compile files('libs/additionnal.jar') 
compile files('libs/mail.jar') 
} 

有人能帮助我如何解决这个问题。
谢谢

+1

我认为你在res >> drawable文件夹中有两个相同名字的drawable。 –

+0

没有我有一个可绘制的文件夹。 –

回答

0

您必须排除模块

编译 'com.android.support:support-v4:23.0.1' 编译('com.android.support:appcompat-v7:25.3。 1 '){ 排除模块: '支持-V4' } 编译(' pl.droidsonroids.gif:机器人-GIF抽拉:1.1.17' ){ 排除模块: '支持-V4' } 编译('com.felipecsl:gifimageview:2.1.0'){ exclude module:'support-v4' }

+0

因为我刚刚新的Android可以指出如何排除gradle file.please –

+0

在你的构建漱口你必须改变编译...我已经为你写了。请检查 – prsandroid

+0

是的modified.still得到相同的错误 –

相关问题