問題描述
我將我的項(xiàng)目更新為最新的 Play 服務(wù) classpath 'com.google.gms:google-services:1.5.0-beta2'
.我還在我的 app.gradle 文件中使用最新版本的 playservices:
I updated my project to the latest Play services classpath 'com.google.gms:google-services:1.5.0-beta2'
. I am also using the latest version of playservices in my app.gradle file as:
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
但是當(dāng)我編譯時(shí),Gradle 拋出異常如下
However when I compile, Gradle throws exception as follows
Error:Execution failed for task ':app:processDebugGoogleServices'. > File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.
推薦答案
你需要從開發(fā)者站點(diǎn)獲取配置文件,并粘貼到你項(xiàng)目的應(yīng)用級(jí)目錄中.
You need to get the configuration file from the developer's site and paste it in the app level directory of your project.
更新:
轉(zhuǎn)到
https://console.firebase.google.com/
選擇您的項(xiàng)目
在左側(cè)菜單中,點(diǎn)擊設(shè)置>項(xiàng)目設(shè)置
On the left menu, click on settings > project settings
在您的應(yīng)用部分下添加應(yīng)用或下載 google-services.json 文件.
Add an app or download the google-services.json file under the Your Apps section.
這篇關(guān)于錯(cuò)誤“模塊根文件夾中缺少文件 google-services.json.沒有它,Google 服務(wù)插件將無法運(yùn)行"的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!