java. util. zip. Zipexception: duplicate entry with firebase
•
Java
I'm building an application using firebase, but I got a duplicate class error I checked all dependencies, but I couldn't figure out where I had two versions of the firebase library Error:
buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.+' } } apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 25 buildToolsVersion '24.0.3' defaultConfig { applicationId "com.android.palmtickle" minSdkVersion 14 targetSdkVersion 25 versionCode 1 versionName "1.0" //Enabling multiDex support. multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro' } } } repositories { mavenCentral() maven { url 'http://dl.bintray.com/amulyakhare/maven' } maven { url 'https://maven.fabric.io/public' } } dependencies { compile('com.digits.sdk.android:digits:2.0.6@aar') { transitive = true; } //support and app compatibility libs compile 'com.android.support:appcompat-v7:25.3.0' compile 'com.android.support:design:25.3.0' compile 'com.android.support:cardview-v7:25.3.0' compile 'com.android.support:recyclerview-v7:25.3.0' compile 'com.android.support:support-v4:25.3.0' compile 'com.google.code.gson:gson:2.7' compile 'com.squareup.retrofit:retrofit:1.9.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'de.hdodenhof:circleimageview:2.0.0' compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' compile 'com.wdullaer:materialdatetimepicker:2.1.1' //entries related to firebase compile 'com.google.firebase:firebase-auth:10.2.1' compile 'com.google.firebase:firebase-database:10.2.1' compile 'com.google.guava:guava-base:r03' compile 'com.yalantis:ucrop:2.2.0-native' }
Because I always try to solve such errors by searching for duplicate files in Android studio When I searched for the class zzb in Android studio, I got a jar firebase-iid-9.0 0 and all other 10.2 1. Firebase class I can't find out how to inject this firebase-iid-9.0 Dependencies of 0 jar? Any ideas?
Solution
Try updating buildtoolsversion to 25.0 two
I face the same problem today. I try to use it
compile 'com.google.firebase:firebase-core:10.2.1' compile 'com.google.firebase:firebase-messaging:10.2.1'
The clean-up and reconstruction projects are all good
Check that the support library is version 25.3.1 of each module 0, and ensure that all firebase modules are 10.2 one
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码