本文介绍了在模块guava-20.0.jar(com.google.guava:guava:20.0)中找到的重复类com.google.common.util.concurrent.ListenableFuture的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在app/build.gradle中使用implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'时,出现此错误:

When I use implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' in my app/build.gradle, I get this error:

Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-20.0.jar (com.google.guava:guava:20.0) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)

Go to the documentation to learn how to Fix dependency resolution errors.

我的app/build.gradle中还有以下内容:

implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-awareness:16.0.0'
implementation 'com.google.android.gms:play-services-cast:16.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-iid:17.1.2'
implementation 'com.google.firebase:firebase-messaging:17.6.0'
implementation 'android.arch.work:work-runtime:1.0.1'
implementation 'com.android.support:multidex:1.0.3'
apply plugin: 'com.google.gms.google-services'

也许我正在使用的库之一已经包含对应用程序内消息依赖的支持,然后它变得多余了?谢谢.

Maybe one of the libraries that I am using already includes support for the In-App Messaging dependency, and then it becomes redundant? Thank you.

推荐答案

我在. user2297550说:

I found the solution at How to solve Program type already present: com.google.common.util.concurrent.ListenableFuture?. user2297550 said:

那是我的解决方案.现在我有了这个,我的应用程序可以正确编译了:

That was the solution for me. Now I have this and my app compiles correctly:

implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
implementation 'com.google.guava:guava:27.0.1-android'

这篇关于在模块guava-20.0.jar(com.google.guava:guava:20.0)中找到的重复类com.google.common.util.concurrent.ListenableFuture的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 12:42