-1

Can you please help me my problem for android studio? Thank you very much!

This is my problem:

enter image description here

AskNilesh
  • 67,701
  • 16
  • 123
  • 163

4 Answers4

1

Update Project gradle

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.1.1' // google-services plugin
    }
}

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

Update You APP Gradle

apply plugin: 'com.android.application'

android {
  // ...
}

dependencies {
  // ...
  compile 'com.google.firebase:firebase-core:11.6.2'

  // Getting a "Could not find" error? Make sure you have
  // the latest Google Repository in the Android SDK manager
}

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'

You need Firebase Version 10.2.0 or above to For Working in Oreo. So Update both Messaging and Core Gradle of Firebase

How to Use Firebase in your Android Application

Tomin B Azhakathu
  • 2,656
  • 1
  • 19
  • 28
0

add below lines in your build.gradle file

android {
    lintOptions {
        abortOnError false
    }
}
Vampire
  • 35,631
  • 4
  • 76
  • 102
Omkar
  • 3,040
  • 1
  • 22
  • 42
0

update your libs version for firebase compile 'com.google.firebase:firebase-core:11.6.0'

previously you are using 10 but as you are targeting Android O you have to use the version greater than 10.

Avinash Ajay Pandey
  • 1,497
  • 12
  • 19
0

You have to update your firebase dependency with latest version in order to work it with android Oreo.

dependencies {
    compile 'com.google.firebase:firebase-core:11.6.2'
}

and you have to add these lines to your android tag in gradle file.

android {
    lintOptions {
        abortOnError false
    }
}
Vampire
  • 35,631
  • 4
  • 76
  • 102
Umair
  • 6,366
  • 15
  • 42
  • 50