1

I'm new to ArcGIS Android i'm trying HelloWord app but its giving me exception.. I checked libraries in project build path, Android Tools> Fix Project Properties, ArcGIS Tools> Fix Project Properties

This code worked for me in Real device but exception in Emulator.. I did every thing giving here..

i did all these but still same error plz help me to fix it...

Here is stack trace..

07-15 16:44:36.639: E/AndroidRuntime(1600): FATAL EXCEPTION: main 07-15 16:44:36.639: E/AndroidRuntime(1600): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hello/com.hello.HellowordActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.android.map.MapView 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.access$600(ActivityThread.java:123) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.os.Handler.dispatchMessage(Handler.java:99) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.os.Looper.loop(Looper.java:137) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.main(ActivityThread.java:4424) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Method.invokeNative(Native Method) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Method.invoke(Method.java:511) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 07-15 16:44:36.639: E/AndroidRuntime(1600): at dalvik.system.NativeStart.main(Native Method) 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.android.map.MapView 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.createView(LayoutInflater.java:606) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.Activity.setContentView(Activity.java:1835) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.hello.HellowordActivity.onCreate(HellowordActivity.java:18) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.Activity.performCreate(Activity.java:4465) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 11 more 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: java.lang.reflect.InvocationTargetException 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Constructor.constructNative(Native Method) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.createView(LayoutInflater.java:586) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 22 more 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: java.lang.ExceptionInInitializerError 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.map.MapView.a(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.map.MapView.<init>(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 25 more 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java: findLibrary returned null 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.Runtime.loadLibrary(Runtime.java:365) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.System.loadLibrary(System.java:535) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.core.internal.util.e$1.initialize(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.io.a.a(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.map.MapSurface.<clinit>(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 27 more

2 Answers 2

3

I am unable to reproduce your issue on Mac or Win. But here are some things to confirm to ensure your settings are correct:

SDK Manager

  1. Ensure ARM EABI v7a System Image is installed for the SDK you are targeting. Remember you must use Android 4.0.3 (API 15) or higher.

AVD Emulator

  1. Choose a device based on Android 4.0.3 or higher.
  2. Choose ARM (armeabi-v7a) for CPU/ABI.
  3. Select Use Host Emulation in the Emulation Options.

Project Settings

  1. Right click your project and select Properties.
  2. Select Java Build Path > Order and Export tab
  3. Make sure ArcGIS for Android 10.1.1 is selected.

Run your project as Android Project on the Emulator.

1

It appears you have issues with the ArcGIS Runtime for Android. Could you provide information as to whether you have it installed and configured correctly. If not please use this link (http://www.esri.com/apps/products/download/index.cfm?fuseaction=download.all) to download and configure the ArcGIS runtime for Android (I have mine installed for eclipse) and retry with the HelloWorld sample and several of the great many samples the good folks at ESRI have provided. Let me know how it turns out. Would love to help further.

P.S.: you might need to register a global account with esri in order to download. It's free just sign up

2
  • I'm Using Eclipse Indigo SR2, JDK 1.7, ADT Ver22, ArcGIS for Android v10.1.1-u1
    – Pradeep
    Jul 15, 2013 at 13:23
  • It appears it cannot see the mapView class. Check the AndroidManifest.xml file to make sure the any changes you might have made are correctly updated. Also try checking the versions of the ADT on the device and the emulator are the correct versions for the project. The emulator might not have the needed version of the API and finally after you do all the above, clean your project before you run it again. Jul 15, 2013 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.