0
按照Google网站上的说明,我从github克隆了示例应用程序并下载了Android Studio。接下来,我按照指示导入项目并连接我的Android手机。为了更好的衡量,我还让Android Studio更新所需的任何内容。运行示例GCM应用程序时出错
我注册并从Google网站下载了google-services.json文件,并按照指示将其放置在我的项目应用程序目录中。
当我运行我得到:
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.
我不知道关于Android,Studio或摇篮任何东西,所以我只是遍布项目目录层次结构由谷歌,services.json的自由主义副本但没有任何工作。
什么是我需要安装google-services.json到“模块根文件夹”?
这是应用程序文件夹。你有你的应用程序build.gradle。不是你的项目,你的应用程序 –
复制google-services.json文件,然后右键单击你的模块/应用程序并粘贴它。 – Pankaj
我没有看到这发生在哪里。在Studio中,我看到一个应用程序文件夹和一些名为Gradle Scripts的东西。查看我的文件系统,我看到/ AndroidStudioProjects/GCMDemo具有subdirs app,gradle和src。我把json文件的副本放在GCMDemo,app,gradle,gradle/wrapper,src/main/res中。没有骰子。 – Greg