如何修复 "Program type already present: androidx.concurrent.futures.DirectExecutor"

How to fix "Program type already present: androidx.concurrent.futures.DirectExecutor"

迁移到 AndroidX 后,由于迁移,我遇到了以下问题:

失败:构建失败,出现异常。

有没有人遇到过类似的问题,因为我在任何论坛上都没有找到解决这个问题的方法。

迁移到 AndroidX 后,我遇到了类似的问题,问题是因为 Guava。 我解决它的方法是包括以下内容:

configurations {
    all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}

在 (Module:app) 中,大多数解决方案建议如果您遇到此问题,请在您的模块 gradle 中包含以下内容:

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

这会导致以下问题:程序类型已存在 androidx.concurrent.futures.DirectExecutor。