異常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.