Select to view content in your preferred language

Working on ARM, not working on Intel Atom (x86)...

6853
13
02-11-2013 10:43 PM
Jaros_awKowalczyk
Emerging Contributor
Hi, is there is some way to run Sample Applications on Emulator with x86 chipset (which on virtualized machines is so much faster than ARM)?
Those applications are working on ARM, but not working on Intel... Don't know why.
In running sample of HelloWorld App LogCat shows me:
02-12 07:59:17.647: E/AndroidRuntime(1303): FATAL EXCEPTION: main
02-12 07:59:17.647: E/AndroidRuntime(1303): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.esri.arcgis.android.samples.helloworld/com.esri.arcgis.android.samples.helloworld.HelloWorld}: android.view.InflateException: Binary XML file line #7: Error inflating class com.esri.android.map.MapView
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.os.Looper.loop(Looper.java:130)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-12 07:59:17.647: E/AndroidRuntime(1303): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 07:59:17.647: E/AndroidRuntime(1303): at java.lang.reflect.Method.invoke(Method.java:507)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-12 07:59:17.647: E/AndroidRuntime(1303): at dalvik.system.NativeStart.main(Native Method)
02-12 07:59:17.647: E/AndroidRuntime(1303): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class com.esri.android.map.MapView
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.Activity.setContentView(Activity.java:1657)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.esri.arcgis.android.samples.helloworld.HelloWorld.onCreate(HelloWorld.java:94)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
02-12 07:59:17.647: E/AndroidRuntime(1303): ... 11 more
02-12 07:59:17.647: E/AndroidRuntime(1303): Caused by: java.lang.reflect.InvocationTargetException
02-12 07:59:17.647: E/AndroidRuntime(1303): at java.lang.reflect.Constructor.constructNative(Native Method)
02-12 07:59:17.647: E/AndroidRuntime(1303): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
02-12 07:59:17.647: E/AndroidRuntime(1303): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
02-12 07:59:17.647: E/AndroidRuntime(1303): ... 21 more
02-12 07:59:17.647: E/AndroidRuntime(1303): Caused by: java.lang.ExceptionInInitializerError
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.esri.android.map.MapView.a(Unknown Source)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.esri.android.map.MapView.<init>(Unknown Source)
02-12 07:59:17.647: E/AndroidRuntime(1303): ... 24 more
02-12 07:59:17.647: E/AndroidRuntime(1303): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load GLMapCore: findLibrary returned null
02-12 07:59:17.647: E/AndroidRuntime(1303): at java.lang.Runtime.loadLibrary(Runtime.java:429)
02-12 07:59:17.647: E/AndroidRuntime(1303): at java.lang.System.loadLibrary(System.java:554)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.esri.android.a.a.a(Unknown Source)
02-12 07:59:17.647: E/AndroidRuntime(1303): at com.esri.android.map.MapSurface.<clinit>(Unknown Source)
02-12 07:59:17.647: E/AndroidRuntime(1303): ... 26 more

, but on ARM works fine.
0 Kudos
13 Replies
AndyJames
Emerging Contributor
The answer is actually pretty simple and with no workaround.  If you look at the ArcGIS runtime for Android, you will notice that it has both a jar and native *.so libraries.  Obviously, the jar is truly cross platform.  However, java code has the ability to call into native libraries which prevents the Java code from being cross platform unless the native libraries are compiled for all the platforms you want.  ESRI only distributes armeabi and armeabi-v7a *.so libraries.  Therefore, when you try to run it on an Intel based emulator, it will try to find an x86 version of the native library and will fail causing the app to crash immediately.  that is what the "UnsatisfiedLinkError" is complaining about in your log.

Therefore, ESRI needs to recompile their native library for x86 and distribute that *.dll along with the ArcGIS runtime for Android.  Until then, nothing you can do.
0 Kudos
Jaros_awKowalczyk
Emerging Contributor
http://blogs.esri.com/esri/arcgis/2012/05/02/arcgis-runtime-sdk-for-android-v1-1-supports-android-em...


I don't know how that should help me (i didn't mention that i've done it already, it's my fault, ok, and other applications are running great  but thanks for answer.

Until then, nothing you can do.

OK. So welcome 'bullet time mode on' on ARM! When i was reading your message i thought for a while that it can be fault that i'm not using Linux (.so) for programming but Windows (which using .dll), but you 'calm me down' and I have to admin that until they don't repair that (i think it's profitable because time is money) that programming and running appliactions with ArcGIS for Android is like playing Max Payne! Thank you esri for so much entertainment!

Happy st. Valentine's Day.
0 Kudos
RobertHewlett2
Deactivated User
Not a fix but a similar problem

I am trying to get the samples to run on an Android vm running within virtual-box.

The vm has the houdini lib ... Angry Birds Space plays fine (fine as in fast for an emulator)

Other android apps (SQLite based ones i.e no MapView) deploy quickly from eclipse.

But the mapview remains blank (network is fine)

03-13 14:47:42.288: E/Trace(5994): error opening trace file: No such file or directory (2)
03-13 14:47:42.384: D/dalvikvm(5994): Trying to load lib /data/data/com.esri.arcgis.android.samples.helloworld/lib/libruntimecore_java.so 0xa6872d70
03-13 14:47:42.424: E/dalvikvm(5994): The lib may be ARM... trying to load it [/data/data/com.esri.arcgis.android.samples.helloworld/lib/libruntimecore_java.so] using houdini
03-13 14:47:42.464: D/houdini(5994): [5994] Loading library(version: 2.0.5.42475 RELEASE)... successfully.
03-13 14:47:42.972: D/dalvikvm(5994): Added shared lib /data/data/com.esri.arcgis.android.samples.helloworld/lib/libruntimecore_java.so 0xa6872d70
03-13 14:47:42.972: E/dalvikvm(5994): Calling NativeMethodHelper for JNI_OnLoad
03-13 14:47:42.972: E/dalvikvm(5994): Version returned : 65538
03-13 14:47:42.984: V/dalvikvm(5994): +++ not scanning '/system/lib/libwebcore.so' for 'nativeMapCreate' (wrong CL)
03-13 14:47:42.984: V/dalvikvm(5994): +++ not scanning 'libnativehelper.so' for 'nativeMapCreate' (wrong CL)
03-13 14:47:42.984: V/dalvikvm(5994): +++ not scanning 'libjavacore.so' for 'nativeMapCreate' (wrong CL)
03-13 14:47:42.984: V/dalvikvm(5994): +++ not scanning '/system/lib/libmedia_jni.so' for 'nativeMapCreate' (wrong CL)
03-13 14:47:42.984: V/dalvikvm(5994): +++ not scanning '/system/lib/librs_jni.so' for 'nativeMapCreate' (wrong CL)
03-13 14:47:42.984: V/dalvikvm(5994): +++ not scanning '/system/lib/libchromium_net.so' for 'nativeMapCreate' (wrong CL)
03-13 14:47:42.984: V/dalvikvm(5994): +++ scanning '/data/data/com.esri.arcgis.android.samples.helloworld/lib/libruntimecore_java.so' for 'nativeMapCreate'
03-13 14:47:42.984: V/dalvikvm(5994): +++ calling dlsym(Java_com_esri_android_map_MapSurface_nativeMapCreate)
03-13 14:47:42.984: V/dalvikvm(5994): Found 'Java_com_esri_android_map_MapSurface_nativeMapCreate' with dlsym
0 Kudos
KalakiNórdsson
Emerging Contributor
Wow I posted this days ago with no replies...

...ESRI needs to recompile their native library for x86 and distribute that *.dll along with the ArcGIS runtime for Android...

Yes but technically it's still a .so file regardless of the platform because Android is unix based. I

So how do we get ArcGIS to build this for us?
0 Kudos
MáximoMussini
Emerging Contributor
Does anyone know if ESRI is working on x86 libraries for this?
0 Kudos
DanO_Neill
Deactivated User
We are considering adding x86 build for the emulator, but currently recommend testing and building on a physical device.  I suggest submitting this request to ArcGIS Ideas.
0 Kudos
ThomasBinu
Deactivated User
try the new genymotion emulator. Its much faster than than the x86 emulator.
0 Kudos
MáximoMussini
Emerging Contributor
As a matter of fact I started using it yesterday. Have you tested that it works with ArcGIS for Android?
0 Kudos