如何解决“程序类型已存在:com.google.common.util.concurrent.ListenableFuture"? [英] How to solve 'Program type already present: com.google.common.util.concurrent.ListenableFuture'?

查看:396
本文介绍了如何解决“程序类型已存在:com.google.common.util.concurrent.ListenableFuture"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用WorkManager 1.0.0-alpha09.并得到此错误:

I am trying to use WorkManager 1.0.0-alpha09. and getting this error:

Program type already present: 
com.google.common.util.concurrent.ListenableFuture

Message{kind=ERROR, text=Program type already present: 
com.google.common.util.concurrent.ListenableFuture, sources=[Unknown source 
file], tool name=Optional.of(D8)}

如果我使用1.0.0-alpha08或更低版本.我没有收到此错误,但是我需要公共构造函数

If i use version 1.0.0-alpha08 or less. I don't get this error, but i need public constructor

public Worker(Context context, WorkerParameters workerParams)

推荐答案

看看 https://issuetracker.google.com/issues/116154359 .

解决方法是:

implementation("android.arch.work:work-runtime:1.0.0-alpha09") {
    exclude group: 'com.google.guava', module: 'listenablefuture' 
}

这篇关于如何解决“程序类型已存在:com.google.common.util.concurrent.ListenableFuture"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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