今天需要对一个项目进行高德地图的集成,以前只是看过,没有操作集成过。具体就是参照官网来进行集成:高德文档中心;
然后根据官网集成之后发现出现了错误,
Error:Execution failed for task ':gdtext:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/amap/api/maps/model/animation/Animation$AnimationListener;
然后就上网查了查网友给出的结果是:删jar包!删jar包!删jar包!重要的事情说三遍。
不过看到过一个大仙给出的解决方法:在defaultConfig字段里面添加 :

本文记录了一位新手在集成高德地图时遇到的错误,包括"Execution failed for task...DexException: Multiple dex files define"和"TransformException: ZipException: duplicate entry"。尝试了删除jar包和在defaultConfig中添加multiDexEnabled true并未完全解决问题。问题根源可能是类重复,但鉴于使用的是依赖集成而非导入jar包,问题有待进一步排查。
1358

被折叠的 条评论
为什么被折叠?



