android studio解决transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
集成了许多jar包,然后android studio编译时报如下错误:Task :SystemUI_Full:transformDexArchiveWithExternalLibsDexMergerForDebug FAILEDAGPBI: {“kind”:“error”,“text”:“Program type already present: com.hp.hpl.sparta.Node”,“
·
集成了许多jar包,然后android studio编译时报如下错误:
Task :SystemUI_Full:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
AGPBI: {“kind”:“error”,“text”:“Program type already present: com.hp.hpl.sparta.Node”,“sources”:[{}],“tool”:“D8”}FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:SystemUI_Full:transformDexArchiveWithExternalLibsDexMergerForDebug’.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\compile\svnProjects\SystemUI_Full\build\intermediates\transforms\dexBuilder\debug\127.jar, D:\compile\svnProjects\SystemUI_Full\build\intermediates\transforms\dexBuilder\debug\128.jar, D:\compile\svnProjects\SystemUI_Full\build\intermediates\transforms\dexBuilder\debug\129.jar, D:\compile\svnProjects\SystemUI_Full\build\intermediates\transforms\dexBuilder\debug\130.jar, D:\compile\svnProjects\SystemUI_Full\build\intermediates\transforms\dexBuilder\debug\126.jar, D:\compile\svnProjects\SystemUI_Full\build\intermediates\transforms\dexBuilder\debug\65.jar
解决方案:将implementation改为compileOnly,避免将依赖的模块重复把jar编译进apk里。
更多推荐
已为社区贡献26条内容
所有评论(0)