解决与firebase相关的问题

时间:2017-07-19 08:22:50

标签: android firebase

  • 出了什么问题: 任务':app:processDebugGoogleServices'。

    执行失败
      

    文件google-services.json缺失。没有它,Google Services插件无法运行。   搜索位置:   C:\ Users \ vinay rao \ AndroidStudioProjects \ MyApplication13 \ app \ src \ debug \ google-services.json   C:\ Users \ vinay rao \ AndroidStudioProjects \ MyApplication13 \ app \ google-services.json

  • 尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。

建立失败

总时间:2.2秒

3 个答案:

答案 0 :(得分:1)

希望您在创建应用程序时从firebase控制台下载 google-services.json 文件。

google-services.json 文件粘贴到项目的应用文件夹中。此步骤非常重要,因为如果没有此文件,您的项目将无法构建。

像这样 enter image description here

答案 1 :(得分:0)

您处理的json文件需要添加到app/目录

详细执行这些步骤,https://developers.google.com/android/guides/google-services-plugin

答案 2 :(得分:0)

转到Google developers门户网站。 填写完所有字段后,您就可以下载google-services.json文件了。然后将google-services.json文件放到app/目录。