Arcgis for Android 开发环境搭建(Androi

作者: 微小码 | 来源:发表于2016-06-21 21:48 被阅读4646次

前言

开发工具:Android Studio 2.1.2(mac版本)
开发环境:OS X EI Capitan 版本 10.11.5
Android系统要求:Android 4.4以上(minSDK 19)
SDK版本:V10.2.7

一.环境分类

在线模式:采用jcenter模式
离线模式:将下载的SDK文件导入到项目中

二.在线模式:jcenter

这个比较简单,只要配置build.gradle就可以了,如下图

jcenter配置.png

配置代码:

    allprojects{
           repositories{
           jcenter()
           maven{
                   url'https://esri.bintray.com/arcgis'
           }
       }
   }

    subprojects{
            afterEvaluate{project->
                 if(project.hasProperty("dependencies")){
                            dependencies{
                                    compile'com.esri.arcgis.android:arcgis-android:10.2.7'
                            }
                    }
            }
    }

三.离线模式(重点)

1.注册一个试用版帐号(60天)

注册地址:http://www.arcgis.com/features/free-trial.html

注册测试帐号.png
SDK下载(需要登录帐号):
https://developers.arcgis.com/downloads/ 1.png 2.png

2.项目搭建

1.png 2.png 3.png

为了方便开发切换下项目视图:

视图切换.png

3.导入SDK相应文件

a.导入jar包

jar包.png

b.导入so文件

so文件.png jniLibs目录位置.png

c.配置build.gradle

packagingOptions{
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
}
配置build.gradle.png

d.配置AndroidManifest.xml

<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
配置AndroidManifest.png

至此,离线开发环境搭建完毕。

源码

https://github.com/andli0626/Arcgis-4-Anroid-By-Android-Studio

参考资料

Arcgis for Anroid 官方网址
https://developers.arcgis.com/android/
参考博文
http://www.cnblogs.com/gis-luq/p/4760833.html

image

相关文章

网友评论

  • 随想先感:集成arcgis后,地图地理位置显示英文并且有水印,怎么去掉呢
  • AndZYH:运行出来一团黑是什么情况,能说明一下吗
  • ff2c2b3bd7b1:棒棒哒!
  • 5741682c8df1:Arcgis 具体干嘛的?
    微小码:@EncoreLiang 移动GIS,主要用于测绘,地理数据的采集,查询,标注,应用与测绘局,城管等APP
    微小码:@EncoreLiang用来做移动地图的

本文标题:Arcgis for Android 开发环境搭建(Androi

本文链接:https://www.haomeiwen.com/subject/qfsgdttx.html