已添加google-services.json文件,但收到错误:模块根文件夹中缺少文件google-services.json

时间:2016-06-22 12:47:27

标签: android json gradle android-gradle

我尝试配置Android开发者控制台并下载 google-services.json 文件。现在我将google-services.json放在 app 文件夹中,然后构建项目,但gradle控制台显示错误:

FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:processDebugGoogleServices'.
    > File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

请帮助我。

1 个答案:

答案 0 :(得分:0)

您需要将google-services.json文件添加到项目的app文件夹中。 从官方文档中阅读此article。 获取您的google-service.json文件here