在我的build.gradle中:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
classpath 'com.google.gms:google-services:2.0.0'
}
}
apply plugin: 'com.android.application'
android {
...
}
apply plugin: 'com.google.gms.google-services' // This is the last line
我试图将google-services.json
放在:
+ build.gradle
+ app
+ google-services.json
+ src
+ app
+ google-services.json
+ main
+ app
+ google-service.json
但google-services
插件未检测到这些json文件。它只是告诉File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.
我应该如何配置我的gradle脚本?我应该把json文件放在哪里?
答案 0 :(得分:0)
google-services.json需要在app文件夹中添加。