0

Currently, I am trying to work with FCM, but I am facing a problem compiling the dependency file. It gives an error like Under Gradle(Module:app):

dependencies {
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.0.0'
}

Error

Error:
Failed to resolve: com.google.firebase:firebase-core:10.0.1    

Error:(22, 13) Failed to resolve: com.google.firebase:firebase-database:10.0.1    

Please tell me the reason why can't it compile successfully.

Diego Giorgini
  • 12,489
  • 1
  • 47
  • 50
yuggi
  • 32
  • 6

1 Answers1

2

If you are using Android Studio 2.0 or above, you can simply add firebase dependencies to Gradle by following simple steps given here. .Following these steps will automatically sync Gradle with latest Firebase dependencies.

Community
  • 1
  • 1
karanatwal.github.io
  • 3,613
  • 3
  • 25
  • 57