很无语的一个问题。
依赖'com.esri.arcgisruntime:arcgis-android:100.0.0'同步时报出“Error:Failed to resolve: com.google.code.gson:gson:2.3.1”。
clean project之后又报出:
Error:A problem occurred configuring project ':app'.>
Could not resolve all dependencies for configuration ':app:_debugApkCopy'. >
Could not resolve com.google.code.gson:gson:2.3.1. Required by: project :app > com.esri.arcgisruntime:arcgis-android:100.0.0 >
Could not resolve com.google.code.gson:gson:2.3.1. >
Could not get resource 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3.1/gson-2.3.1.pom'. >
Could not HEAD 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3.1/gson-2.3.1.pom'. > Server sent an unsupported extension: type_35
很尴尬啊,找了很久不知道什么问题。
在线依赖“com.esri.arcgisruntime:arcgis-android:100.0.0”,更可怕直接卡在下download arcgis-android-100.0.0.aar上面。(一直开着VPN)
按照官网文档和网上大神的经验配置离线:
1、本地配置maven,并将arcgis-android-100.0.0.aar和arcgis-android-100.0.0.pom放入在C:\Users\Administrator.m2\repository\com\esri\arcgis\android\arcgis-android\100.0.0和C:\Users\Administrator.m2\repository\com\esri\arcgisruntime\arcgis-android\100.0.0(因为不知道哪个对,索性就配置了两个)。
2、so文件放在了src/main/jinLibs文件夹下,并在build.gradle配置了。
3、arcgis-android-api.jar和gson-2.3.1.jar放在libs下并依赖。
4、project下的build.gradle也配置了本地仓库。