Reputation:
I get the following error while integrating Firebase into my project for the first time.
Could not find: com.google.firebase:firebase-core:9.6.1
I followed the steps mentioned on the Firebase documentation, in the section Add Firebase to your Android Project, topic Available libraries.
I updated my packages Google Play Services (rev 33) and Google Repository (rev 32).
What are my options to resolve this error?
Upvotes: 0
Views: 3907
Reputation: 2657
To use firebase analytics you need a few things:
·Google play services package, rev 33
·Add this classpath in your project.gradle:
buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:3.0.0'
}
}
·Add firebase core dependencie in app.gradle:
apply plugin: 'com.android.application'
android {
// ...
}
dependencies {
// ...
compile 'com.google.firebase:firebase-core:9.6.1'
}
·Finally add pluguin at final of app.gradle:
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
Then you can start to work with Firebase Analytics, you can find more info from sdk here, apply changes and rebuild project, tell me if you can use it with this changes, greetings!
Upvotes: 0
Reputation: 838
Upgrade you Google Repository to rev 36. com.google.firebase:firebase-messaging:9.6.1
is available from rev 35.
Upvotes: 1
Reputation: 86
Check if your Google Play Services version is the same (9.6.1) and update it also to the newest one or downgrade firebase version to the same:
compile 'com.google.android.gms:play-services:9.6.1'
Show us your build.gradle
Upvotes: 0
Reputation: 428
The latest version of Google Repository is rev 36
. You can try upgrading; it should resolve your problem.
Upvotes: 0