Reputation: 2790
I was trying to install new firebase database into my app, but it was failed with next error:
Error:Could not find com.google.firebase:firebase-database:9.2.0. Required by: appName:app:unspecified
than i clone official google example frome here and was trying to build database example, but i still get same error...
looks like this is because of some google error. am i right? in other case, why it happens and how to fix this?
Upvotes: 3
Views: 2931
Reputation: 56
The part I was missing was in by build.gradle (Project:). Make sure this is there:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
It allows the project to find it in Google's Maven repository.
Upvotes: 0
Reputation: 34608
You have to update/install Google Repository, revision 30 (Your android studio latest version).
Upvotes: 8
Reputation: 3388
Instead of adding the project, Just add google services dependency to you root level gradle classpath 'com.google.gms:google-services:3.0.0'
and firebase database dependency to your app level gradle compile 'com.google.firebase:firebase-database:9.2.0'
Upvotes: 1