Sim*_*rok 46 java android guava android-workmanager
我正在尝试使用WorkManager 1.0.0-alpha09.我收到此错误:
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)}
Run Code Online (Sandbox Code Playgroud)
如果我使用版本1.0.0-alpha08或更少.我没有得到这个错误,但我需要公共构造函数
public Worker(Context context, WorkerParameters workerParams)
Run Code Online (Sandbox Code Playgroud)
Ang*_*i H 83
在我的情况下,我不得不将以下配置添加到应用程序的模块build.gradle
:
configurations {
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}
Run Code Online (Sandbox Code Playgroud)
它发生是因为一些依赖关系使用com.google.guava:guava
和com.google.guava:listenablefuture
一起 它会导致依赖冲突.
Rah*_*hul 30
请查看https://issuetracker.google.com/issues/116154359.
解决方法是:
implementation("android.arch.work:work-runtime:1.0.0-alpha09") {
exclude group: 'com.google.guava', module: 'listenablefuture'
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
10039 次 |
最近记录: |