project目录下build.gradle添加以下代码:
allprojects {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
}
}
如果用到google_service.json
apply plugin: 'com.google.gms.google-services'
classpath后面添加:classpath 'com.google.gms:google-services:3.2.0'
然后再 sync,接下来就等待。。。