错误:任务执行失败':transformClassesWithMultidexlistForDebug'

时间:2018-03-01 17:37:12

标签: android gradle build.gradle

在我的build.gradle上做了一些重构后,我无法停止出现此错误。 我的应用程序类扩展了Multidex,并安装在attachBaseContext上。

清洁+重建不起作用:(

我google了很多,我找不到任何东西。任何人都可以帮助我吗?

错误:

  

java.io.IOException:无法编写[/build/intermediates/multi-dex/debug/componentClasses.jar](无法读取[/build/intermediates/transforms/desugar/debug/106.jar( ;;;;;; **。class)](重复的zip条目[106.jar:android / support / design / widget / CoordinatorLayout $ Behavior.class]))

的build.gradle

tasks.whenTaskAdded { task ->
    if (task.name == "lintVitalRelease") {
        task.enabled = false
    }
}
apply plugin: 'project-report'
apply plugin: 'com.android.application'
apply plugin: 'realm-android'


repositories {
    maven { url "https://jitpack.io" }
    maven { url 'https://repo.spring.io/libs-milestone' }
    maven { url 'https://maven.fabric.io/public' }
    mavenCentral()
    google()
}
buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        mavenCentral()
    }

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

android {
    compileSdkVersion 27
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "appIdHere"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        minSdkVersion 17
        targetSdkVersion 27
        versionName "3.2.0.0"
        versionCode 13
        multiDexEnabled true
    }
    dataBinding.enabled = true
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

    signingConfigs {
        release {
            storeFile file(RELEASE_STORE_FILE)
            storePassword RELEASE_STORE_PASSWORD
            keyAlias RELEASE_KEY_ALIAS
            keyPassword RELEASE_KEY_PASSWORD
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }

    dexOptions {
        preDexLibraries = false
        javaMaxHeapSize "2g"
    }

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

    lintOptions {
        abortOnError false
    }

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

dependencies {
    ext {
        android = '27.0.2'
        firebase = '10.2.0'
    }
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "com.android.support:appcompat-v7:$android"
    implementation "com.android.support:cardview-v7:$android"
    implementation "com.android.support:recyclerview-v7:$android"
    implementation "com.android.support:design:$android"
    implementation "com.android.support:palette-v7:$android"
    implementation "com.android.support:support-v4:$android"
    implementation "com.google.android.gms:play-services:10.2.0"
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.google.guava:guava:23.0-android'
    implementation('com.crashlytics.sdk.android:crashlytics:2.7.0@aar') {transitive = true}
    implementation 'com.android.support:multidex:1.0.2'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'net.danlew:android.joda:2.9.4.2'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'com.orhanobut:logger:1.15'
    implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
    implementation 'com.beardedhen:androidbootstrap:1.2.3'
    implementation 'com.github.aakira:expandable-layout:1.6.0@aar'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'io.realm:android-adapters:2.0.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.github.bluejamesbond:textjustify-android:2.1.6'
    implementation 'com.github.darsh2:MultipleImageSelect:v0.0.4'
    implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
    implementation 'br.com.jansenfelipe:androidmask:1.0.1'
    implementation 'cat.ereza:customactivityoncrash:1.5.0'
    implementation 'com.github.piasy:rxandroidaudio:1.5.1'
    implementation 'com.github.chrisbanes:PhotoView:2.1.2'
    implementation 'com.github.sharish:CreditCardView:v1.0.4'
    implementation 'me.shaohui.advancedluban:library:1.3.5'
    implementation 'com.github.jkwiecien:EasyImage:2.0.4'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'me.relex:circleindicator:1.2.2@aar'
    implementation 'com.github.amlcurran.showcaseview:library:5.4.3'
    implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0@aar'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'io.reactivex:rxjava:1.1.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    androidTestCompile 'junit:junit:4.12'

}

apply plugin: "com.google.gms.google-services"
apply plugin: 'io.fabric'

0 个答案:

没有答案