2

version conflict either by updating the version of the google-services plugin or updating the version of com.google.android.gms to 11.0.4. i tried this(Conflict with firebase 11.8.0 and google-services plugin 3.1.2) solution but failed

Messages Gradle Build

build.Gradle(Project Level)

build.Gradle(App level)

App level gradle code

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "com.example.shadow.pakistannetcafe"
        minSdkVersion 15
        targetSdkVersion 26
        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 'com.android.support.constraint:constraint-layout:1.0.2'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.android.support:design:26.0.2'
    compile 'com.android.support:support-v4:26.0.2'

    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-messaging:11.8.0'
    compile 'com.google.firebase:firebase-auth:9.2.1'

    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

Project Level Gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Humxa Moghal
  • 122
  • 11

1 Answers1

1

Keep all the firebase dependencies same version so use (in app-level gradle )

 compile 'com.google.firebase:firebase-auth:11.8.0'

instead of

 compile 'com.google.firebase:firebase-auth:9.2.1'
Santanu Sur
  • 10,997
  • 7
  • 33
  • 52