Reputation:
I'm trying to include Firebase Authentication in my Android app, but when I compile my program I get the error
Program type already present: com.google.android.gms.auth.api.signin.internal.zzp
Changing the version from 11.8.0 to 11.2.2 worked, but I need to use Firestore, which only has 11.8.0, and the two are incompatible. Here's my build.gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.my.app"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.google.firebase:firebase-auth:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Is there a conflicting file I need to delete?
Upvotes: 0
Views: 503
Reputation: 80934
You need to change this:
implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
to this:
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
Also there is no firebase 11.2.2, I think you meant 11.4.2 which is compatible with the above firebase ui version.
The firebase version 11.8.0 is compatible with firebaseui 3.2.1
You can check this table here: https://github.com/firebase/FirebaseUI-Android#compatibility-with-firebase--google-play-services-libraries
Upvotes: 2