2017-10-30 13 views
1

When i generate release build then i got this error Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/arch/core/internal/SafeIterableMap$ListIterator.classエラー:タスク ':app:transformClassesWithJarMergingForRelease'の実行に失敗しました。リリース

buildscript { 
    repositories { 
     maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 
     classpath 'io.fabric.tools:gradle:1.23.0' 
    } 
} 

apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 

repositories { 
    maven { url 'https://maven.fabric.io/public' } 
} 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.2' 

    defaultConfig { 
     applicationId "com.hatchapps.multimedia" 
     minSdkVersion 16 
     targetSdkVersion 26 
     versionCode 17 
     multiDexEnabled = true 
     versionName "1.0" 
//  aaptOptions.cruncherEnabled = false 
//  aaptOptions.useNewCruncher = false 
     vectorDrawables.useSupportLibrary = true 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
//   minifyEnabled false 
      multiDexEnabled = true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
     debug { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 
        'proguard-rules.pro' 
     } 
    } 
    packagingOptions { 
     exclude '.readme' 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/notice' 
     exclude 'META-INF/notice.txt' 
     exclude 'META-INF/license' 
     exclude 'META-INF/license.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/LICENSE' 

     exclude 'META-INF/ASL2.0' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/MANIFEST.MF' 
     exclude 'META-INF/rxjava.properties' 
     exclude 'META-INF/services/javax.annotation.processing.Processor' 
     pickFirst 'AndroidManifest.xml' 
    } 



    dexOptions { 
     javaMaxHeapSize "4g" 
    } 
} 

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.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 


    //noinspection GradleCompatible 

    compile 'com.android.support:appcompat-v7:26.1.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'eu.inloop:localmessagemanager:0.1.5' 
    compile 'com.jakewharton:butterknife:8.8.1' 
    compile 'com.koushikdutta.ion:ion:2.2.1' 
    compile 'it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15' 
    compile 'com.android.support:design:26.1.0' 
    compile 'com.android.support:cardview-v7:26.1.0' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'com.cocosw:bottomsheet:[email protected]' 
    compile 'com.zhy:flowlayout-lib:1.0.3' 
    compile 'com.github.bumptech.glide:glide:3.7.0' 
    compile 'io.reactivex:rxandroid:1.2.1' 
    compile 'io.reactivex:rxjava:1.3.0' 
    compile 'com.andkulikov:transitionseverywhere:1.7.4' 
    compile 'com.master.android:permissionhelper:1.1' 
    compile 'net.alhazmy13.MediaPicker:libary:2.3.2' 
    compile 'com.github.jaychang0917:SimpleText:1.2.1' 
    compile 'com.github.tabassumLatif:ShimmerRecyclerView:0.1.2' 
    compile 'com.tomergoldst.android:tooltips:1.0.6' 
    compile 'com.github.Pixplicity:sharp:03c1568d26' 
    compile 'id.zelory:compressor:2.0.0' 
    compile 'com.github.danikula:AndroidVideoCache:v2.7.0' 
    compile ('com.google.firebase:firebase-messaging:11.0.2'){ 
     force = true 
    } 
    compile 'com.fenchtose:tooltip:0.1.5' 
    compile 'com.jsibbold:zoomage:1.1.0' 
    compile 'at.blogc:expandabletextview:1.0.3' 
    compile 'com.github.douglasjunior:android-simple-tooltip:0.2.1' 
    compile 'com.theartofdev.edmodo:android-image-cropper:2.4.7' 
    compile 'com.oginotihiro:cropview:1.0.0' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.wonderkiln:camerakit:0.11.0' 
    testCompile 'junit:junit:4.12' 
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' 
    compile('com.android.support:support-v4:26.1.0'){ 
     force = true 
    } 
} 
apply plugin: 'com.google.gms.google-services' 

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0' 
//  classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 
     classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1' 
//  classpath 'com.google.firebase:firebase-plugins:1.0.5' 
     classpath 'com.google.gms:google-services:3.0.0' 
//  classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.3" 
     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
     maven { url "https://jitpack.io" } 
     maven { url "https://plugins.gradle.org/m2/" } 
     /*maven { 
      url "https://maven.google.com" 
     }*/ 
     google() 
    } 
} 

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

この問題は解決しました。 –

+0

どうですか?私は3.0.0に更新gradleプラグインを持って以来、まったく同じ問題を抱えています。そして、リリースビルド(debuggableがfalseに設定されている)の場合にのみ – smora

+0

私はコンパイル時に 'com.wonderkiln:camerakit:0.11.0'というライブラリを持っています。 問題ライブラリは更新されておらず、3.0.0 –

答えて

0

がコメントを読んで、この問題を自分で持って、問題が悪いサードパーティのlibに由来しているようです。おそらく、互換性のないgradleまたはbuildtoolライブラリを使用しています。

問題LIBS:

  • com.wonderkiln:camerakit:0.11.0
  • android.arch.persistence.room
  • com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer

他の人は彼らの/libsフォルダに悪いのlibsと同様の問題を抱えています。

関連する問題