Arcgis Fro Android 100.3.0环境配置

1.在Project的build.gradle文件中进行以下配置:
allprojects {
    repositories {
        google()
        jcenter()

        // Add the following ArcGIS repository
        maven {
            url 'https://esri.bintray.com/arcgis'
        }
    }
}
2.在module的build.gradle中添加依赖:
// Add ArcGIS Runtime SDK for Android dependency
implementation 'com.esri.arcgisruntime:arcgis-android:100.3.0'

添加packagingOptions

 packagingOptions {
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
    }

和 JDK 1.8支持

 // Add below lines to set compatibility with Java 8 language features for an Android app module.
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
3.在清单文件AndroidManifest.xml中添加:
<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" />

// Apps that use a GeoView will require using OpenGL 2.x:
 <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>

// Apps that use Viewshed or LineOfSight will require using OpenGL 3.x:
 <uses-feature
        android:glEsVersion="0x00030000"
        android:required="true"/>

参考文档:https://developers.arcgis.com/android/latest/guide/install-and-set-up.htm

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容