Original address:
ArcGIS Runtime for Android Development tutorial V2.0 (2) Development environment configuration-arcgis_mobile column-Blog channel-csdn.net
http://blog.csdn.net/arcgis_mobile/article/details/8113948
2 , development environment configuration
2.1 System Requirements
1) Supported Operating systems
A. Windows XP (32-bit), Vista (32/64-bit), Windows 7 (32/64-bit)
B. Mac OS X 10.5.8 or later (only x86 supported)
C. Linux (Ubuntu, Lucid Lynx)
- GNC C Library above 2.7
- Ubuntu Linux 8.04 or more
- 64-bit systems require the ability to run 32-bit applications
2) Eclipse IDE
A. Above Eclipse 3.6.2 (Helios)
B. Eclipse JDT Plug-in (installed in most Eclipse packages)
C. Eclipse has software packages for a variety of development purposes, and it is recommended to use the following packages:
- Eclipse IDE for Java EE developers;
- Eclipse IDE for Java developers;
- Eclipse Classic
D. JDK6 and above (requires JDK, only JRE is not enough)
E. Need to install ADT plug-ins before installing ESRI-provided development plug-ins
3) supported Android SDK
SDK platform Android 2.2,api 8 and above
4) Supported versions of ArcGIS Server
ArcGIS for Android supports ArcGIS Server 9.3.1 and above:
- ArcGIS Server for Java Platform
- ArcGIS Server for. NET Platform
5) OpenGL ES2.0
ArcGIS Runtime SDK for Android uses OpenGL ES 2.0. If you are developing with an emulator, you need to use Android 4.0.3 or more versions of the emulator (GPU supported), as described later.
2.2 preparatory work
1) Operating system: Windows 7 Ultimate Edition
2) Jdk:jdk7 (Installation and configuration process not repeat)
Http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html
3) Eclipse Ide:eclipse 3.7.2 (Indigo) for Java EE developers
Http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr2
4) Android SDK Installer:installer_r20.0.3-window.exe
Official address: Http://dl.google.com/android/installer_r20.0.3-windows.exe
csdn:http://download.csdn.net/detail/arcgis_mobile/4684836
2.3 Android Configuration
1) Download Android SDK for Windows installation package, use Installer_r20.0.3-window.exe here
2) Run Installer_r20.0.3-window.exe, complete the installation, after the installation is finished, the Android SDK Manager opens by default, as shown in:
3) Select 3.1 and 4.1.2 (which will be used when developing with the simulator) to install, by default the Android SDK Platform-tools and Google USB driver will be installed simultaneously. In 4.1.2, the ARM EABI v7a System image must be ticked, which is a core image that provides support for NDK usage. The AVD cannot be created without installing the image.
4) Next install the Android Development Tools (ADT) plugin. Open the menu help >> Install New software, add the ADT plugin address to the available software sites list with the address: Https://dl-ssl.google.com/android/ Eclipse, named ADT, selects Adt,eclipse in available software sites to get information about ADT, as shown in. The current version is 20.0.3, it is worth noting that this version provides the NDK Plugin for the JNI approach development.
In addition to the online installation, you can also choose to install locally, first download ADT. Website address: http://dl.google.com/android/ADT-20.0.3.zip,CSDN:http://download.csdn.net/detail/arcgis_mobile/4684776
5) Select Android Ddms and Android development Tools, other options, complete the installation, and restart Eclipse.
6) After Eclipse restarts, open the menu Windows >> Preferences and you will find that Android-related content is already available in Preferences. We just need to specify the SDK installation path, as shown in:
2.4 ArcGIS Runtime for Android Configuration
1) First download plugin, website address: Http://resources.arcgis.com/en/communities/runtime-android/, or Arcgis_mobile blog:/http download.csdn.net/detail/arcgis_mobile/4459474.
2) Open the menu help >> install New software, click the Add button, click the Archive button in the pop-up window, install the downloaded ArcGIS Android plugin package locally and complete the installation. As shown in the following:
3) After installing and restarting Eclipse, open the menu file >> new >> Project ... and you can see that in New Project, ArcGIS for Android is already available, indicating that ArcGIS for A Ndroid has been installed successfully, as shown in:
2.5 using Andorid Equipment Development
ArcGIS Runtime SDK for Android has some basic requirements for Android devices: Android version 2.2 and above, support OpenGL ES2.0. Beyond that, there is no difference between developing on a real machine with a generic Android project. The following shows how to develop with Android devices.
First, create a new ArcGIS Android project and simply use the example program that comes with the ArcGIS Android Eclipse plugin. Create a new project and navigate to ArcGIS Samples forandroid as shown in.
Click Next to select the simplest HelloWorld from the example program, as shown in. Click the Finish,helloworld sample program to create the success. Because the plugin comes with a sample program based on Android 2.2, the ANDRODSDK version used by the project is reset. Here, set into Android3.1.
Connect the Android device to the computer's USB interface via a data cable, and the computer will automatically install the driver when it is first connected. In the development options for Android system settings, select USB Debugging. Running HelloWorld, the program uploads to the connected Android device and installs and runs automatically. The run effect is as shown.
2.6 using Android Simulator Development
When developing with the Android emulator, the emulator is required to support the GPU due to the requirements for OpenGL ES2.0. Android 4.0.3 and above versions of the emulator provide support for the GPU.
Android 4.1.2 Simulator is used here. Open Android Virtual Device Manager in Eclipse and create a new emulator. Android (Target) version selection 4.1.2,cpu automatically selects the arm (ARMEABI-V7A) installed in 2.3. It is important to note that in the hardware parameter, you add the GPU emulation and set the on State as shown in.
Run the emulator, run HelloWorld on the emulator, and run the results as shown.
It is not efficient to develop an ArcGIS Android program on an arm-based simulator. Android after 4.0.3, support Intel x86 Cpu,intel also released the Intel x86 Simulator accelerator. The results show that the accelerator has an obvious acceleration effect on the Android simulator. However, the ArcGIS Android SDK does not currently support Intel x86, so we are not able to enjoy the increased experience of Intel accelerators. How to install and use Intel Accelerators is no longer described here.
ArcGIS Runtime for Android Development tutorial V2.0 (2) Development environment configuration