Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Error while running HelloWorld app. #27

Closed
delatitude opened this issue Jan 20, 2015 · 7 comments
Closed

Error while running HelloWorld app. #27

delatitude opened this issue Jan 20, 2015 · 7 comments

Comments

@delatitude
Copy link

I have downloaded the file "arcgis-runtime-samples-android-master" and then did exactly as described in the "ReadMe" document.

Imported the folder as "Import Non Android Studio Project" & then Run by selecting "HelloWorld". After running it crashes & gives the following error message in LogCat.

01-20 18:27:11.729 2578-2578/com.arcgis.android.samples.maps.helloworld I/art﹕ Not late-enabling -Xcheck:jni (already on)
01-20 18:27:11.823 2578-2578/com.arcgis.android.samples.maps.helloworld E/art﹕ dlopen("/data/app/com.arcgis.android.samples.maps.helloworld-1/lib/x86/libruntimecore_java.so", RTLD_LAZY) failed: dlopen failed: "/data/app/com.arcgis.android.samples.maps.helloworld-1/lib/x86/libruntimecore_java.so" has unexpected e_machine: 40
01-20 18:27:11.823 2578-2578/com.arcgis.android.samples.maps.helloworld D/AndroidRuntime﹕ Shutting down VM
01-20 18:27:11.823 2578-2578/com.arcgis.android.samples.maps.helloworld E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.arcgis.android.samples.maps.helloworld, PID: 2578
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.arcgis.android.samples.maps.helloworld/com.arcgis.android.samples.maps.helloworld.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class com.esri.android.map.MapView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class com.esri.android.map.MapView
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
at android.app.Activity.setContentView(Activity.java:2144)
at com.arcgis.android.samples.maps.helloworld.MainActivity.onCreate(MainActivity.java:31)
at android.app.Activity.performCreate(Activity.java:5933)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
            at android.app.Activity.setContentView(Activity.java:2144)
            at com.arcgis.android.samples.maps.helloworld.MainActivity.onCreate(MainActivity.java:31)
            at android.app.Activity.performCreate(Activity.java:5933)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.arcgis.android.samples.maps.helloworld-1/lib/x86/libruntimecore_java.so" has unexpected e_machine: 40
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:989)
at com.esri.core.internal.RuntimeHelper.a(SourceFile:85)
at com.esri.core.internal.RuntimeHelper.initialize(SourceFile:47)
at com.esri.android.map.MapSurface.(SourceFile:68)
at com.esri.android.map.MapView.a(SourceFile:585)
at com.esri.android.map.MapView.(SourceFile:620)
            at java.lang.reflect.Constructor.newInstance(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
            at android.view.LayoutInflater.createView(LayoutInflater.java:607)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
            at android.app.Activity.setContentView(Activity.java:2144)
            at com.arcgis.android.samples.maps.helloworld.MainActivity.onCreate(MainActivity.java:31)
            at android.app.Activity.performCreate(Activity.java:5933)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

@doneill
Copy link
Contributor

doneill commented Jan 20, 2015

@delatitude Did you run this sample with the emulator? Specifically the an x86 emulator?

@delatitude
Copy link
Author

Thanks. Yes, I am testing on emulator in Android Studio (Nexus 5 API 21 x86). You have pointed me to the right direction. Running this app on device worked with no issues. Are there any steps to overcome issue with the emulator ?

@doneill
Copy link
Contributor

doneill commented Jan 20, 2015

We have a known issue with respect to using our AAR SDK bundle with x86 emulators. From our release notes

x86 native *.so files bundled in AAR do not work on android stock x86
emulator. They do work on device. If you need to test on x86 emulator then you
need to should not use the AAR bundle and instead add all the libs manually.

You can either create an ARM based emulator or use a physical device. If you must use an x86 emulator than you need to set up your app manually.

@delatitude
Copy link
Author

Indeed, your answers solved my problem. Thanks.

@pengkv
Copy link

pengkv commented Apr 18, 2016

1、在build.gradle里面加
defaultConfig {
multiDexEnabled true
}
2、在Application里面加
@OverRide
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
3、编译试试

@parcool
Copy link

parcool commented Nov 30, 2016

@pengkv 没用。。。试过了!小米note正常,三星galaxy s7 edge直接闪退!

@SnowyWinter
Copy link

我也遇到了这个问题

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants