-1

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

This is my problem:

enter image description here

AskNilesh
  • 63,753
  • 16
  • 113
  • 150

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,648
  • 1
  • 18
  • 27
0

add below lines in your build.gradle file

android {
    lintOptions {
        abortOnError false
    }
}
Vampire
  • 32,892
  • 3
  • 65
  • 94
Omkar
  • 2,810
  • 1
  • 21
  • 38
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,407
  • 12
  • 18
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
  • 32,892
  • 3
  • 65
  • 94
Umair
  • 6,078
  • 15
  • 42
  • 48