异常1;
异常特征:
编译时候报错,如下:
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
原因分析:
此问题是由于工程中导入了重复的包。
解决方案:
可通过Run with --stacktrace进入查看是什么包重复了,排查到,删除掉即可
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.