Reputation: 1934
So, I downloaded the firebase quickstarters and I am trying to learn how to build android apps with android studio and firebase, but I can't get this app to compile. Whenever I try to run it I get the error...
Error:Execution failed for task ':app:processMinSdkIcsDebugGoogleServices'. Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.2.0.
In my build.gradle it has the com.google.android.gms:play-services-auth:11.2.0, and in the main build.gradle file is has com.google.gms:google-services:3.1.0, both of which are the correct version that it is asking for, so it makes no sense to me on why it is telling me that's what it needs, that's what it has. Here is my build.gradle file for Module:app
apply plugin: 'com.android.application'
check.dependsOn 'assembleMinSdkJellybeanDebugAndroidTest', 'assembleMinSdkIcsDebugAndroidTest'
android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
flavorDimensions "minSdkVersion"
defaultConfig {
applicationId "com.google.firebase.quickstart.auth"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
productFlavors {
// Build variant with minSdk 16 to include Facebook and FirebaseUI libraries.
minSdkJellybean {
dimension "minSdkVersion"
minSdkVersion 16
}
// Build variant with minSdk 14, excludes Facebook and FirebaseUI libraries.
minSdkIcs {
dimension "minSdkVersion"
minSdkVersion 14
}
}
}
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:26.0.0'
}
dependencies {
// Firebase Authentication
// Google Sign In SDK (only required for Google Sign In)
// Firebase UI
// Used in FirebaseUIActivity. The FirebaseUI-Android library has a minSdk level of 16
// so this library is only included in the minSdkJellybean variant.
// Facebook Android SDK (only required for Facebook Login)
// Used in FacebookLoginActivity. This is only compiled into the minSdkJellybean variant of this
// app. You can build a 'minSdkGingerbread' variant to test on devices with 9 <= SDK <= 15.
// Twitter Android SDK (only required for Twitter Login)
compile('com.twitter.sdk.android:twitter-core:1.6.6@aar') {
transitive = true
}
compile('com.twitter.sdk.android:twitter:1.13.1@aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:animated-vector-drawable:26.0.0'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.google.android.gms:play-services-auth:11.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-storage:10.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
minSdkJellybeanCompile 'com.firebaseui:firebase-ui-auth:1.2.0'
minSdkJellybeanCompile 'com.facebook.android:facebook-android-sdk:4.9.0'
minSdkJellybeanCompile 'com.android.support:customtabs:26.0.0'
}
apply plugin: 'com.google.gms.google-services'
And here is the build.gradle file for Project: auth
buildscript {
repositories {
jcenter()
mavenLocal()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I don't understand, both of the things it says it needs are the version it needs, but it still complains and won't compile. Please help, I feel pretty bad that I can't even get a premade quickstarter to compile, that was made by google. Thank you.
Upvotes: 0
Views: 551
Reputation: 832
You are using Firebase plugin version 10.0.1
which is different from the google-services version 11.2.0
. You should update your Firebase plugin or change all the other google-sdk versions from 11.2.0 to 10.0.1
You may change the dependencies to this:
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:animated-vector-drawable:26.0.0'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-storage:10.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
minSdkJellybeanCompile 'com.firebaseui:firebase-ui-auth:1.2.0'
minSdkJellybeanCompile 'com.facebook.android:facebook-android-sdk:4.9.0'
minSdkJellybeanCompile 'com.android.support:customtabs:26.0.0'
or this:
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:animated-vector-drawable:26.0.0'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.google.android.gms:play-services-auth:11.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-storage:11.2.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
minSdkJellybeanCompile 'com.firebaseui:firebase-ui-auth:1.2.0'
minSdkJellybeanCompile 'com.facebook.android:facebook-android-sdk:4.9.0'
minSdkJellybeanCompile 'com.android.support:customtabs:26.0.0'
Upvotes: 1