无法解析com.google.firebase:firebase-database:16.0.1

时间:2018-07-04 07:13:12

标签: android database firebase

解析com.google.firebase:firebase-core:16.0.1和com.google.firebase:firebase-auth:16.0.2时没有错误。有什么建议吗?

1 个答案:

答案 0 :(得分:8)

尝试在顶级gradle文件中添加google()仓库:

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

allprojects {
   // ...
   repositories {
   // ...
   google() // Google's Maven repository
 } 
}