在我的build.gradle:文件谷歌 - services.json從模塊根目錄文件夾中缺少
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
但是,這些JSON文件被google-services
插件檢測到。它只是告訴File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.
我應該如何配置我的gradle腳本?我應該在哪裏放置json文件?
它應該在app文件夾> ** ProjectName \ app \ google-services.json ** – Gaurav
@Gaurav所以你的意思是'app'文件夾應該和'build.gradle'文件一樣嗎? – jayatubi
是ProjectLevel build.gradle,您會在應用程序文件夾中找到一個build.gradle(模塊級別) – Gaurav