com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:comgoogleand

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:comgoogleand,第1张

概述将firebasesdk添加到gradle后,面临以下问题.错误:任务’:app:transformClassesWithJarMergingForDebug’的执行失败.com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicateentry:com/google/android/gms/internal/zzbn.class请帮助!T

将firebase sdk添加到gradle后,面临以下问题.

错误:任务’:app:transformClassesWithJarMergingForDeBUG’的执行失败.

com.android.build.API.transform.transformException: java.util.zip.ZipException: duplicate entry: com/Google/androID/gms/internal/zzbn.class

请帮助!

This is the APP gradle file apply plugin: 'com.androID.application'apply plugin: 'io.fabric'apply plugin: 'me.tatarka.retrolambda'apply plugin: 'com.fernandocejas.frodo'apply plugin: 'realm-androID'apply plugin: 'com.neenbedankt.androID-apt'androID {    compileSdkVersion 23    buildToolsversion '23.0.2'    defaultConfig {        applicationID "com.bt.bms"        minSdkVersion 16        targetSdkVersion 23        testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner"        versionCode 6        versionname "0.0.11"        multIDexEnabled true        // Following line of code added to provIDe support for blurring image using renderscript        renderscriptTargetAPI 16        renderscriptSupportModeEnabled true    }    signingConfigs {        bms_deBUG_config {            keyAlias 'androIDdeBUGkey'            keyPassword 'androID'            storefile file('bms_new_app_deBUG.keystore')            storePassword 'androID'        }    }    packagingOptions {        exclude 'APK liCENSE.txt'        exclude 'liCENSE.txt'        exclude 'meta-inf/services/javax.annotation.processing.Processor'    }    buildTypes {//        deBUG {//            applicationIDSuffix ".deBUG"//            MinifyEnabled false//            deBUGgable true//        }        release {            MinifyEnabled false            proguardfiles 'proguard.cfg'        }        deBUG {            signingConfig signingConfigs.bms_deBUG_config        }    }    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }    lintoptions {        checkReleaseBuilds true    }    defaultPublishConfig "deBUG"    repositorIEs {        jcenter()        maven {url = "https://oss.sonatype.org/content/repositorIEs/snapshots/" }        flatDir {            dirs 'libs'        }    }    dexOptions {        incremental true        javaMaxHeapSize "8g"    }}String getJavaHome(String version) {    def stdout = new ByteArrayOutputStream()    exec {        commandline "/usr/libexec/java_home", "-v", version        standardOutput = stdout;    }    return stdout.toString().trim()}retrolambda {    //jvmArgs '-noverify'    jdk System.getenv('JAVA8_HOME') ?: getJavaHome("1.8")    oldJdk System.getenv('JAVA7_HOME') ?: getJavaHome("1.7")}dependencIEs {    compile filetree(dir: 'libs', include: ['*.jar'])    compile project(':common')    compile project(':domain')    compile project(':API')    apt project(':compiler')    // Times Square library for calendar    compile project(':timessquare')    // App Modules    compile(name: 'app-models', ext: 'aar')    compile(name: 'app-network', ext: 'aar')    compile(name: 'app-error', ext: 'aar')    // AndroID support librarIEs    compile 'com.androID.support:appcompat-v7:23.4.0'    compile 'com.androID.support:design:23.4.0'    compile 'com.androID.support:cardvIEw-v7:23.4.0'    compile 'com.androID.support:percent:23.4.0'    compile 'com.androID.support:recyclervIEw-v7:23.4.0'    compile 'com.androID.support:palette-v7:23.4.0'    //Play Services Location and Map    compile 'com.Google.androID.gms:play-services-location:9.0.2'    // For G+ login    compile 'com.Google.androID.gms:play-services-auth:9.0.2'    compile 'com.Google.androID.gms:play-services-plus:9.0.2'    // Facebook    compile ('com.facebook.androID:facebook-android-sdk:4.7.0'){        exclude group: 'com.Google.androID.gms'    }    // For CLever Tap    compile 'com.cLevertap.androID:cLevertap-androID-sdk:2.0.5'    // Espresso Related DependencIEs    compile 'com.androID.support.test.espresso:espresso-IDling-resource:2.2'    testCompile 'com.androID.support.test:testing-support-lib:0.1'    androIDTestCompile('com.androID.support.test.espresso:espresso-core:2.2') {        // Necessary if your app targets Marshmallow (since Espresso hasn't moved to Marshmallow yet)        exclude group: 'com.androID.support', module: 'support-annotations'    }    androIDTestCompile('com.androID.support.test:runner:0.3') {        // Necessary if your app targets Marshmallow (since the test runner hasn't moved to Marshmallow yet)        exclude group: 'com.androID.support', module: 'support-annotations'    }    androIDTestCompile('com.androID.support.test.espresso:espresso-contrib:2.2') {        // Necessary to avoID version conflicts        exclude group: 'com.androID.support', module: 'appcompat'        exclude group: 'com.androID.support', module: 'support-v4'        exclude group: 'com.androID.support', module: 'support-annotations'        exclude module: 'recyclervIEw-v7'    }    androIDTestCompile('com.androID.support.test.espresso:espresso-intents:2.2') {        exclude group: 'com.androID.support', module: 'support-annotations'    }    // Retrofit    compile 'com.squareup.retrofit:retrofit:2.0.0-beta4'    compile 'com.squareup.okhttp:okhttp:2.4.0'    compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'    compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta2'    compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'    // Reactive x    compile 'io.reactivex:rxandroID:1.0.1'    compile 'javax.inject:javax.inject:1'    // Picasso    compile 'com.squareup.picasso:picasso:2.4.0'    // Butterknife    compile 'com.jakewharton:butterknife:7.0.1'    // Dagger 2 dependencIEs    apt 'com.Google.dagger:dagger-compiler:2.0'    compile 'com.Google.dagger:dagger:2.0'    // Crashlytics    compile('com.crashlytics.sdk.androID:crashlytics:2.5.5@aar') {        transitive = true;    }    // Anotation    compile 'javax.annotation:javax.annotation-API:1.2'    // Other    compile 'com.alexvasilkov:foldable-layout:1.0.1'    compile 'com.ms-square:expandableTextVIEw:0.1.4'    compile 'com.mikhaellopez:circularimagevIEw:2.0.1'    compile 'com.makeramen:roundedimagevIEw:2.2.1'    // For MultIDex    compile 'com.androID.support:multIDex:1.0.1'    //For Bottom Sheet    compile 'com.flipboard:bottomsheet-core:1.5.0'    compile 'com.flipboard:bottomsheet-commons:1.5.0'    // For Juspay    compile('in.juspay:godel:0.6.7') {        exclude group: 'com.androID.support', module: 'appcompat'        exclude group: 'com.androID.support', module: 'support-v4'    }    // For mockito    compile 'org.mockito:mockito-all:2.0.2-beta'    // Parceler    compile 'org.parceler:parceler-API:1.0.4'    apt 'org.parceler:parceler:1.0.4'    // Expandable Recycler VIEw    compile 'com.github.grennis:ExpandableRecyclerVIEw:0.9.3'    // For JW Player    compile project(':jwplayer-android-sdk-2.1.1+142')    compile 'com.Google.androID.librarIEs.cast.companionlibrary:ccl:2.8.3'    //Sectioned RecyclerVIEw    compile 'eu.davIDea:flexible-adapter:5.0.0-b6'    compile 'jp.wasabeef:recyclervIEw-animators:2.2.3'    deBUGCompile 'com.github.promeg:xlog-compiler:2.1.1' // ~6kB    deBUGCompile 'com.github.promeg:xlog-androID:2.1.1' // ~150kB    releaseCompile 'com.github.promeg:xlog-androID-IDle:2.1.1' // ~5kB    deBUGCompile 'com.squareup.leakcanary:leakcanary-androID:1.4-beta2'    releaseCompile 'com.squareup.leakcanary:leakcanary-androID-no-op:1.4-beta2'    testCompile 'com.squareup.leakcanary:leakcanary-androID-no-op:1.4-beta2'    // For Firebase    compile 'com.Google.firebase:firebase-core:9.0.2'    compile 'com.Google.firebase:firebase-config:9.0.2'}// ADD THIS AT THE BottOMapply plugin: 'com.Google.gms.Google-services'

解决方法:

只需执行命令-./gradlew:app:dependencIEs,然后使用其他任何版本的Google play服务查看您在内部使用的库.如果是,则删除或更新这些库.

总结

以上是内存溢出为你收集整理的com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:com / google / and全部内容,希望文章能够帮你解决com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:com / google / and所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1093926.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存