文件谷歌 - services.json从模块根目录文件夹中缺少。该谷歌服务插件不能没有它的功能 [英] File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it

查看:3067
本文介绍了文件谷歌 - services.json从模块根目录文件夹中缺少。该谷歌服务插件不能没有它的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 1个模块和2个应用项目。该模块用于code部分的这两个应用程序使用。
当然的我在应用程序的根文件夹分开谷歌,services.json文件。

I have a project with 1 module and 2 applications. The module is used for code parts that both applications uses. Of course i have separate google-services.json files in the app's root folders.

构建是工作的很好的最后一个星期五。

现在我尝试编译并得到了这个错误:

Now i try to compile and got this error:

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

唯一的错误提示信息是关于此谷歌services.json文件 缺少在我的模块根文件夹。

我不知道这里有什么问题吗?

I dont know what is the problem here?

该模块是不是一个应用程序,为什么我要加一个谷歌,services.json文件,它为什么前几天的工作没有改变?

The module is not an application, why would i have to add a google-services.json file and why it was worked some days ago without modification?

E D I T:

我已经在谷歌API控制台一个新的谷歌应用程序,并增加了新的谷歌,services.json文件甚至是我的模块,得到了同样的错误。

I have made a new google app in google api console and added a new google-services.json file even to my module, got the same error.

推荐答案

添加multiDexEnabled真实项目中的应用gradle这个文件,并检查

Add multiDexEnabled true in your project app gradle file and check,

defaultConfig {
    multiDexEnabled true
}

这篇关于文件谷歌 - services.json从模块根目录文件夹中缺少。该谷歌服务插件不能没有它的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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