将google-services.json文件放在eclipse项目中的哪里? [英] Where to put google-services.json file into eclipse project?

查看:859
本文介绍了将google-services.json文件放在eclipse项目中的哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Android上实现新的 GCM客户端

I'm trying to implement the new GCM client on Android.

有一点,你有为应用启用 Google服务。启用 Cloud Messaging 后,您必须下载文件 google-services.json 并将其放在 app / mobile / 目录。问题是在我的eclipse项目中,这个目录不存在。

At one point, you have to enable Google Services for the app. After enabling Cloud Messaging you have to download the file google-services.json and put it in the app/ or mobile/ directory. The problem is that in my eclipse project this directories doesn't exist.

所以我的问题是:我该在哪里放这个文件?

So my question is: where do I have to put this file?

推荐答案

似乎对于eclipse,该文件不是必需的。我已经设法让客户端没有它。

只需按照在Android上实施GCM客户端,并使用 google-services.json 文件跳过该部分。

It seems that for eclipse that file is not necessary. I've managed to make the client work without it.
Just follow the steps from Implementing GCM Client on Android and skip the part with the google-services.json file.

更新:对于Android Studio,说明很清楚。该文件必须放在项目的应用/目录中: https:/ /developers.google.com/cloud-messaging/android/client#add-config

UPDATE: For Android Studio the instructions are pretty clear. The file must be put in the app/ directory of your project: https://developers.google.com/cloud-messaging/android/client#add-config

PS任何投票都应该与评论中指定的原因一致吗? :)

P.S. Any vote down should go along with the reason specified in a comment, or not? :)

这篇关于将google-services.json文件放在eclipse项目中的哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆