0

Adding Firebase dependencies is giving below error:

Failed to resolve: com.google

enter image description here This is my app/build.gradle

`

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.xxxxxxx.xxxxx"
        minSdkVersion 21
        targetSdkVersion 28
        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:28.0.0-alpha3'
    implementation 'com.google.firebase: firebase-core: 16.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

apply plugin: 'com.google.gms.google-services'

`

I referred to "Failed to resolve: com.google.firebase:firebase-core:9.0.0" but, didn't worked. Thank you in advance.

Viplav
  • 33
  • 6

1 Answers1

3

Check this line implementation 'com.google.firebase: firebase-core: 16.0.0' You have a space between com.google.firebase: and firebase-core:16.0.0. Remove those spaces