将近 3 天以来,我一直在努力解决一个问题。当我尝试在模拟器上构建应用程序时,构建失败并出现以下问题。Multiple dex files define Lcom/google/common/util/concurrent/ServiceManager$ServiceManagerState$1;如果我点击它,我会看到:org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)我启用了 muldiDex,我已经尝试了一堆我在 github 和 stackoverflow 上找到的不同解决方案,但没有任何帮助。这里是我项目的 github 链接:https ://github.com/staropramen/BuildItBigger 知道吗?
1 回答
慕的地6264312
TA贡献1817条经验 获得超6个赞
问题是我在 :app build.gradle 文件中导入了 :backend。
删除后:
implementation project(':backend')
它工作正常。
添加回答
举报
0/150
提交
取消