將近 3 天以來,我一直在努力解決一個(gè)問題。當(dāng)我嘗試在模擬器上構(gòu)建應(yīng)用程序時(shí),構(gòu)建失敗并出現(xiàn)以下問題。Multiple dex files define Lcom/google/common/util/concurrent/ServiceManager$ServiceManagerState$1;如果我點(diǎn)擊它,我會(huì)看到: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,我已經(jīng)嘗試了一堆我在 github 和 stackoverflow 上找到的不同解決方案,但沒有任何幫助。這里是我項(xiàng)目的 github 鏈接:https ://github.com/staropramen/BuildItBigger 知道嗎?
1 回答

慕的地6264312
TA貢獻(xiàn)1817條經(jīng)驗(yàn) 獲得超6個(gè)贊
問題是我在 :app build.gradle 文件中導(dǎo)入了 :backend。
刪除后:
implementation project(':backend')
它工作正常。
添加回答
舉報(bào)
0/150
提交
取消