blatimer@cloca.com

Application crashes when trying to view map.

Discussion created by blatimer@cloca.com on Apr 4, 2013
Latest reply on Apr 4, 2013 by blatimer@cloca.com
Hi,

I'm new to Android development and to ArcGIS as well.

I have inherited an app project from a previous developer. So far I have changed it's target from 2.2 to 4.2. I have some warnings about deprecated methods, but nothing that should stop the app from running (I don't think).

The previous app (2.2 Froyo version) has been published to google play and *that* version works without issue.

I am testing *my* version on my Galaxy Nexus (physical device, not emulated). For the most part it runs without issue.

I can use all the features of the app.....except the maps.

Whenever I try to view a map, I get the message "Unfortunately [app name] has stopped working."

Looking over my Logcat file, the issue seems to be originating with "Error inflating class com.esri.android.map.MapView" but I'm not sure.

Here's the relevant section of the logcat. I have also attached a txt version to this post.

Any suggestions would be greatly appreciated. Thank you in advance.

04-04 15:01:48.942: E/AndroidRuntime(12686): FATAL EXCEPTION: main
04-04 15:01:48.942: E/AndroidRuntime(12686): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cloca.CAapp/com.cloca.CAapp.Enniskillen_MapTabs}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cloca.CAapp/com.cloca.CAapp.EnniskillenMap}: android.view.InflateException: Binary XML file line #24: Error inflating class com.esri.android.map.MapView
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.os.Looper.loop(Looper.java:137)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.main(ActivityThread.java:5039)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at java.lang.reflect.Method.invokeNative(Native Method)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at java.lang.reflect.Method.invoke(Method.java:511)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at dalvik.system.NativeStart.main(Native Method)
04-04 15:01:48.942: E/AndroidRuntime(12686): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cloca.CAapp/com.cloca.CAapp.EnniskillenMap}: android.view.InflateException: Binary XML file line #24: Error inflating class com.esri.android.map.MapView
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.startActivityNow(ActivityThread.java:2023)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.widget.TabHost.setCurrentTab(TabHost.java:413)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.widget.TabHost.addTab(TabHost.java:240)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.cloca.CAapp.Enniskillen_MapTabs.onCreate(Enniskillen_MapTabs.java:31)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.Activity.performCreate(Activity.java:5104)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
04-04 15:01:48.942: E/AndroidRuntime(12686):  ... 11 more
04-04 15:01:48.942: E/AndroidRuntime(12686): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class com.esri.android.map.MapView
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.createView(LayoutInflater.java:613)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.Activity.setContentView(Activity.java:1881)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.cloca.CAapp.EnniskillenMap.onCreate(EnniskillenMap.java:30)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.Activity.performCreate(Activity.java:5104)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
04-04 15:01:48.942: E/AndroidRuntime(12686):  ... 21 more
04-04 15:01:48.942: E/AndroidRuntime(12686): Caused by: java.lang.reflect.InvocationTargetException
04-04 15:01:48.942: E/AndroidRuntime(12686):  at java.lang.reflect.Constructor.constructNative(Native Method)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at android.view.LayoutInflater.createView(LayoutInflater.java:587)
04-04 15:01:48.942: E/AndroidRuntime(12686):  ... 33 more
04-04 15:01:48.942: E/AndroidRuntime(12686): Caused by: java.lang.ExceptionInInitializerError
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.esri.android.map.MapView.a(Unknown Source)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.esri.android.map.MapView.<init>(Unknown Source)
04-04 15:01:48.942: E/AndroidRuntime(12686):  ... 36 more
04-04 15:01:48.942: E/AndroidRuntime(12686): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java from loader dalvik.system.PathClassLoader[dexPath=/system/framework/com.google.android.maps.jar:/data/app/com.cloca.CAapp-1.apk,libraryPath=/data/app-lib/com.cloca.CAapp-1]: findLibrary returned null
04-04 15:01:48.942: E/AndroidRuntime(12686):  at java.lang.Runtime.loadLibrary(Runtime.java:365)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at java.lang.System.loadLibrary(System.java:535)
04-04 15:01:48.942: E/AndroidRuntime(12686):  at com.esri.core.intern

Outcomes