【发布时间】:2016-01-25 08:22:48
【问题描述】:
我有一个包含 1 个模块和 2 个应用程序的项目。该模块用于两个应用程序都使用的代码部分。当然,我在应用的根文件夹中有单独的 google-services.json 文件。
上周五构建运行良好。
现在我尝试编译并得到这个错误:
File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.
:DoToDoSenderApp:compileDebugSources
:DoToDoSenderApp:transformClassesWithDexForDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task ':DoToDoSenderApp:transformClassesWithDexForDebug'.
> com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2
唯一的信息错误消息是关于我的模块根文件夹中缺少这个 google-services.json 文件。
不知道这里有什么问题?
该模块不是应用程序,为什么我必须添加一个 google-services.json 文件以及为什么它在几天前就可以工作而无需修改?
编辑
我在 Google API 控制台中创建了一个新的 Google 应用程序,并在我的模块中添加了一个新的 google-services.json 文件,得到了同样的错误。
【问题讨论】:
-
您能否添加文件夹结构的描述,显示项目、应用程序以及 google-services.json 文件的位置。
标签: android json google-cloud-messaging google-play-services