Android 导入开发库transformDexArchiveWithExternalLibsDexMergerForDebug,exception:Error while merging dex

导入第三方架包到新的模块,出现如下编译错误

找了很多解决办法都没解决,比如;

https://stackoverflow.com/questions/55209281/nativescript-execution-failed-for-task-error-while-merging-dex-archives
https://developer.android.com/studio/build/multidex
https://www.hellojava.com/a/69381.html 

等都无济于事,最终发现是新库中的类与其他模块中的库存在类名相同的问题,最终找到解决问题的办法是:WinRAR jar包解压缩,去掉重复的class,重新压缩生成新的jar包再编译。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章