我收到了这个错误:
org.gradle.api.GradleException: File google-services.json is missing. The
Google Services Plugin cannot function without it.
我希望有人帮助我,我几乎尝试了一切,但我失败了!!
注意:请确保我已下载“google-services.json”,然后将其放入MyProjectName / app
这是我项目的构建gradle(项目):
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'com.google.firebase:firebase-plugins:1.0.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:2)
在 Firebase控制台中,您必须导航到项目设置并在已连接的 Android中选择 google-services.json 应用的
您必须将此文件放入项目目录中的app
目录。