ArcGIS Android 10.2.5 Development environment configuration

Source: Internet
Author: User

Create a new Android project in Android Studio

Minimum SDK selection 4.0.3,arcgis Android 10.2.5 minimum supported version changed to 4.0, if not mistaken.

Add support for ArcGIS Android 10.2.5

Official Guide Links:

Https://developers.arcgis.com/android/guide/install-and-set-up.htm

Modify the project's Gradle file
allprojects {    repositories {        jcenter ()        //  ADD The following ArcGIS repository         maven {            'http://dl.bintray.com/esri/arcgis'        }    } }
Add dependencies for ArcGIS Android 10.2.5
Dependencies {    ...     // Add the ArcGIS Android 10.2.5 API  ' com.esri.arcgis.android:arcgis-android:10.2.5 '}     
APP Module Gradle File
Android {    ...    packagingoptions {        'meta-inf/lgpl2.1'        meta-inf/ LICENSE 'meta-inf/notice'}}            
Add the Androidmanifest.xml file in the

<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" />     <uses-feature        android:glesversion="0x00020000"         android:required="true" />
Start Project
< Com.esri.android.map.MapView     xmlns:android = "Http://schemas.android.com/apk/res/android"     android:id= "@+id/mapview"    android:layout_width= "Fill_parent"     android:layout_height= "Fill_parent"    />

Add a map control to XML

and add a map to the show.

Mapview Mmapview; Arcgistiledmapservicelayer tilelayer; @Overrideprotectedvoid  onCreate (Bundle Savedinstancestate) {    super. OnCreate (savedinstancestate);    Setcontentview (r.layout.activity_main);    Mmapview=(Mapview) Findviewbyid (R.id.mapview);     New Arcgistiledmapservicelayer (            "Http://services.arcgisonline.com/ArcGIS/rest/services/World_ Street_map/mapserver ");     // Add tiled layer to Mapview     Mmapview.addlayer (tilelayer);}

Try adding a HelloWorld.

Let's take a look at the real-machine test.

Precautions:

1. Due to the loading of the Basemap, network access is required to ensure that WiFi or data networks are connected

2. Check the Enable GPU in the simulator creation option when testing simulator

It's done.

ArcGIS Android 10.2.5 Development environment configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.