processDebugResources'。 >错误:多个库名称为“com.google.android.gms” [英] processDebugResources'. > Error: more than one library with package name 'com.google.android.gms'

查看:155
本文介绍了processDebugResources'。 >错误:多个库名称为“com.google.android.gms”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Firebase Cloud Messaging添加到了我的Android应用程序,并将我的旧应用程序从GCM升级到FCM。我按照 Firebase控制台中的步骤尝试了示例应用,该工作正常。



在我的应用程序中将相同的代码嵌入到现有代码中后,即使构建成功,但尝试在Android Studio中的设备上运行应用程序时,出现此错误:

 获取错误:包名称为com.google.android.gms的多个库。 

请参阅从终端获取的依赖关系截图。我使用

来检查依赖关系命令> gradlew -q依赖关系项目名称:依赖项--configuratio
n编译

结果如下:



任何建议表示赞赏。以前在我的应用程序中的一些模块是使用旧的googleplayservices的jar文件。



使用谷歌玩相同版本的服务
像下面一样

$ p code $ dependencies {
compile'c​​om.google.android.gms :play-services:9.6.1'
}

我希望能帮到一些需要。


I added Firebase Cloud Messaging to my Android app and I'm upgrading my old app from GCM to FCM. I tried the sample app by following the steps in Firebase Console, which works fine.

After embedding same code into the existing code in my app, even though the build is successful, while trying to run the app on a device in Android Studio, I get this error:

getting the error: more than one library with package name 'com.google.android.gms'.

See the dependencies screenshot taken from terminal. I checked the dependencies using

command >gradlew -q dependencies project name:dependencies --configuratio
n compile

Here is the result:

Any suggestion is appreciated.

解决方案

Previously some modules in my app was using old jar files of googleplayservices.

After using google play services with same version like below

dependencies {
    compile 'com.google.android.gms:play-services:9.6.1'
}

I hope it will help some one needed.

这篇关于processDebugResources'。 >错误:多个库名称为“com.google.android.gms”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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