【发布时间】:2018-04-17 19:21:54
【问题描述】:
我遇到了这个错误:
org.gradle.api.GradleException: File google-services.json is missing. The
Google Services Plugin cannot function without it.
我希望有人帮助我,我几乎尝试了所有方法,但我失败了!!
注意:请确保我已下载“google-services.json”,然后将其放入 MyProjectName/app
这是我项目的构建 gradle(project):
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
}
【问题讨论】:
-
确保您已从使用当前包名注册的项目中下载了 google-services.json
-
我确定,我在那里输入了我的包名
-
您的问题解决了吗?
标签: android android-studio android-gradle-plugin build.gradle android-sdk-2.3