问题描述
迁移到AndroidX后,由于迁移,我遇到了以下问题:
After migrating to AndroidX, I have the following issue as a result of the migration:
失败:构建失败,并出现异常.
FAILURE: Build failed with an exception.
- 出了什么问题:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug'的执行失败.
- What went wrong:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
有人遇到过类似的问题,因为我在任何论坛中都没有找到解决此问题的任何方法.
Has anyone come across a similar issue, as I have not found any solutions to this problem in any forum.
推荐答案
迁移到AndroidX后,我遇到了类似的问题,该问题是由于番石榴造成的.我解决该问题的方法是包括以下内容:
After migrating to AndroidX, I had a similar issue and the issue was because of Guava.The way I resolved it was to include the following:
configurations {
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}
在(Module:app)中,大多数解决方案建议如果遇到此问题,请在模块gradle中包含以下内容:
In the (Module:app), most solutions suggest that if you encounter this issue you include the following, in your module gradle:
implementation("android.arch.work:work-runtime:1.0.0-alpha09") {
exclude group: 'com.google.guava', module: 'listenablefuture'
}
这会导致以下问题:程序类型已经存在androidx.concurrent.futures.DirectExecutor.
This results in the following issue: Program type already present androidx.concurrent.futures.DirectExecutor.
这篇关于如何修复“程序类型已存在:androidx.concurrent.futures.DirectExecutor"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!