错误:任务执行失败':app:transformClassesWithJarMergingForRelease'.3

时间:2017-10-17 16:05:12

标签: android gradle

当我想发布我的项目时,发生了这个错误:

  

错误:任务':app:transformClassesWithJarMergingForRelease'的执行失败。   com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / fasterxml / jackson / databind / AbstractTypeResolver.class

这是我的模块Gradle:

android {

compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "com.example.vesal.servertest"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 1
    multiDexEnabled true
    versionName "1.0"
    testInstrumentationRunner 
     "android.support.test.runner.AndroidJUnitRunner"
    manifestPlaceholders = [onesignal_app_id               : "3d64bedd-f82d-
      4ffd-a968-a2f1caac0fc2",
                            onesignal_google_project_number: "577414806614"]
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
   'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
    exclude 'META-INF/ASL2.0'
}
}

 dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.mikepenz:materialdrawer:5.9.5@aar') {
    transitive = true
}
compile('com.github.orangegangsters:lollipin:2.0.0@aar') {
    transitive = true
}
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
compile 'com.romainpiel.shimmer:library:1.4.0@aar'
compile 'com.wrapp.floatlabelededittext:library:0.0.6'
compile 'com.github.tibolte:elasticdownload:1.0.+'
compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.0'
compile 'com.airbnb.android:lottie:2.2.5'
compile 'devlight.io:navigationtabbar:1.2.5'
compile 'com.github.rey5137:material:1.2.4'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.vstechlab.easyfonts:easyfonts:1.0.0'
compile 'com.aurelhubert:ahbottomnavigation:2.0.4'
compile 'com.roughike:bottom-bar:2.3.1'
compile 'com.mikepenz:iconics-core:2.9.3@aar'
compile 'com.mikepenz:google-material-typeface:3.0.1.1.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.3@aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.2.0.3@aar'
compile 'com.mikepenz:meteocons-typeface:1.1.0.3@aar'
compile 'com.mikepenz:community-material-typeface:1.9.32.2@aar'
compile 'com.mikepenz:weather-icons-typeface:2.0.10.3@aar'
compile 'com.mikepenz:typeicons-typeface:2.0.7.3@aar'
compile 'com.mikepenz:entypo-typeface:1.0.0.3@aar'
compile 'com.mikepenz:devicon-typeface:2.0.0.3@aar'
compile 'com.mikepenz:foundation-icons-typeface:3.0.0.3@aar'
compile 'com.mikepenz:ionicons-typeface:2.0.1.3@aar'
compile 'com.mikepenz:pixeden-7-stroke-typeface:1.2.0.1@aar'
compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]'
compile 'com.pegah.backtory:backtory-android-sdk:0.5.3'
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
compile 'com.android.support:design:26.1.0'
compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.3'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
}

这是我的Project Gradle:

   buildscript {
  repositories {
      jcenter()
   }
   dependencies {
      classpath 'com.android.tools.build:gradle:2.3.3'

      }
     }

     allprojects {
       repositories {
               jcenter()
             mavenCentral()
       maven {
        url "https://jitpack.io"
        maven {
            url "https://oss.sonatype.org/content/repositories/snapshots"
            url "https://www.jitpack.io"
            url 'https://dl.bintray.com/pegah-backtory/maven/'
        }
    }
      maven { url 'https://maven.google.com' }
      maven { url "https://github.com/omadahealth/omada-
    nexus/raw/master/release" }
     }
  }

  task clean(type: Delete) {
   delete rootProject.buildDir
 }

请帮帮我!!

0 个答案:

没有答案