1. 程式人生 > >專案整合高德地圖SDK後出現的錯誤

專案整合高德地圖SDK後出現的錯誤

專案整合高德地圖SDK後出現下面錯誤:

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

> More than one file was found with OS independent path 'assets/map_assets/icons_6_14_1510107235.data'


原因是build.gradle中已經有下面的程式碼:

compile fileTree(include: ['*.jar'], dir: 'libs')

就不再需要下面的程式碼了:

compile 'com.amap.api:navi-3dmap:latest.integration'
compile 'com.amap.api:search:latest.integration'
compile 'com.amap.api:location:latest.integration'

解決:

把不需要的程式碼刪除,錯誤就消失了