我将我的项目更新到最新的Play服务类路径“com.google.gms:google-services:1.5.0-beta2”。我也在我的app.gradle文件中使用最新版本的playservices:

compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'

然而,当我编译时,Gradle抛出异常如下

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.

当前回答

如果您无法访问项目的Firebase,例如,您下载了一个示例源代码,那么您必须删除任何与Firebase相关的东西才能使项目运行。

在项目中搜索关键字

列表项 织物 重火力点 谷歌服务 crashlytics

其他回答

如果你不再需要它了……

…\ build.gradle:

类路径的com.google.gms:谷歌服务:3.2.0

->

// classpath 'com.google.gms:google-services:3.2.0'

…\ app \ build.gradle:

应用插件:'com.google.gms.google-services'

->

// apply plugin: 'com.google.gms.google-services'

对于从firebase codelabs教程第3步来到这里的人:请转到第4页。

Apparently, if google says You should now have the android-start project open in Android Studio. ,She means it,and not You should now have the android-start project open in Android Studio, without any build-errors . As the instruction says there, you have to get a configuration file from firebase. i.e , create a new project in your firebase acc with name 'friendly chat and in the next page , add its package name and SHA1 KEY. after downloading the json file,add it to your project>app folder, and Rebuild project.

您需要从开发人员的站点获取配置文件,并将其粘贴到项目的应用程序级目录中。

更新:

Goto

https://console.firebase.google.com/ 选择您的项目 在左侧菜单中,单击设置>项目设置 添加一个应用程序或下载谷歌服务。json文件在你的应用程序部分。

对于任何使用Firebase的人来说,你需要进入你的控制台,它会显示“将项目添加到Android”。从那里,它将逐步生成谷歌的服务。Json文件。

您必须进入Firebase控制台—>设置—>项目设置,然后会有下载最新配置文件的部分。下载谷歌服务。并放入app文件夹。这是我的工作。 链接: https://developers.google.com/identity/sign-in/android/start-integrating https://developers.google.com/android/guides/client-auth