我将我的项目更新到最新的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.

当前回答

如果你不再需要它了……

…\ 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,例如,您下载了一个示例源代码,那么您必须删除任何与Firebase相关的东西才能使项目运行。

在项目中搜索关键字

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

https://developers.google.com/android/ 你需要生成一个配置文件,它可以让你访问你在开发人员控制台注册的所有服务和api,并把它放在根目录中

从开发人员的站点转到配置文件,并将其粘贴到当前项目的应用程序级目录中。

步骤:

导航到你的项目文件夹,打开/app子文件夹。 在这里粘贴.json文件。 重新构建项目。

如果你不再需要它了……

…\ 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'