ArcGIS - Unsatisfied link error find library returned null - Hello World sample app

1,347

Like Google maps , arc GIS also won't work in Emulator , to run your app in Real device it should work

Share:
1,347

Related videos on Youtube

Vansi
Author by

Vansi

I am a software developer. You can email me @gmail.com. My username there is dowgird.

Updated on November 24, 2022

Comments

  • Vansi
    Vansi over 1 year

    This is my first time into the ArcGIS but not the first time for Android. I am an Android developer. For one of our recent projects, i am exploring the ArcGIS modules/samples. I did the following steps:

    1. Installed Eclipse JUNO (latest) - Since my previous version got corrupted, had to replace the system.
    2. Downloaded ArcGIS runtime SDK for Android 10.1.1.
    3. Installed the ArcGIS plugin from the downloaded zip file obtained from step 2.
    4. Restarted Eclipse/System.

    Now to explore the basic "Hello World" ArcGIS app, i did the following steps.

    1. File - New - Project - In the new window - selected the "ArcGIS for Android" option.
    2. Out of the 2 options i selected "ArcGIS samples for Android". This option opened another window to fetch the samples from local or online.
    3. I selected "LOCAL".
    4. Under "Maps" section, i selected the "Hello World" sample project.
    5. Now the Hello World project is in my workspace.
    6. Cleaned and build the project. All errors gone.
    7. Run the project.

    I am obtaining the following error log:

    06-26 16:36:15.678: E/AndroidRuntime(2672): FATAL EXCEPTION: main
    06-26 16:36:15.678: E/AndroidRuntime(2672): 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 #9: Error inflating class com.esri.android.map.MapView
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.ActivityThread.access$600(ActivityThread.java:130)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.os.Handler.dispatchMessage(Handler.java:99)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.os.Looper.loop(Looper.java:137)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.ActivityThread.main(ActivityThread.java:4745)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at java.lang.reflect.Method.invokeNative(Native Method)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at java.lang.reflect.Method.invoke(Method.java:511)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at dalvik.system.NativeStart.main(Native Method)
    06-26 16:36:15.678: E/AndroidRuntime(2672): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.android.map.MapView
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.createView(LayoutInflater.java:613)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.Activity.setContentView(Activity.java:1867)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.esri.arcgis.android.samples.helloworld.HelloWorld.onCreate(HelloWorld.java:42)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.Activity.performCreate(Activity.java:5008)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
    06-26 16:36:15.678: E/AndroidRuntime(2672): ... 11 more
    06-26 16:36:15.678: E/AndroidRuntime(2672): Caused by: java.lang.reflect.InvocationTargetException
    06-26 16:36:15.678: E/AndroidRuntime(2672): at java.lang.reflect.Constructor.constructNative(Native Method)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at android.view.LayoutInflater.createView(LayoutInflater.java:587)
    06-26 16:36:15.678: E/AndroidRuntime(2672): ... 22 more
    06-26 16:36:15.678: E/AndroidRuntime(2672): Caused by: java.lang.ExceptionInInitializerError
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.esri.android.map.MapView.a(Unknown Source)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.esri.android.map.MapView.<init>(Unknown Source)
    06-26 16:36:15.678: E/AndroidRuntime(2672): ... 25 more
    06-26 16:36:15.678: E/AndroidRuntime(2672): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java: findLibrary returned null
    06-26 16:36:15.678: E/AndroidRuntime(2672): at java.lang.Runtime.loadLibrary(Runtime.java:365)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at java.lang.System.loadLibrary(System.java:535)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.esri.core.internal.util.e$1.initialize(Unknown Source)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.esri.android.io.a.a(Unknown Source)
    06-26 16:36:15.678: E/AndroidRuntime(2672): at com.esri.android.map.MapSurface.<clinit>(Unknown Source)
    06-26 16:36:15.678: E/AndroidRuntime(2672): ... 27 more
    

    Later i followed the ArcGIS forums and came across many links for example http://forums.arcgis.com/threads/484...-returned-null http://forums.arcgis.com/threads/850...ello-World-run but alas the error was never cleared.

    I encountered a similar problem with one of my Android projects. It had the libs folder with .so files for armeabi and armeabi-v7a. I converted the project into a library and used it one of my another project. Since it was a small project i didn't needed to explore the converted library project. This is due to the referencing of the .so files or library files related to the Eclipse updates. I am still unsure how to configure the .so files into the build path so that there is no "Unsatisfied link" error.

    Please see the screenshot attached for the Build Path of this project. Build Path image

  • Vansi
    Vansi almost 11 years
    Yes. In real device it works without any problem. But to make the sample work in an emulator, the emulator should never be an x86 image emulator. It should be always a API level 15 ARM-eabi-v7a image emulator. Follow this link for more details. blogs.esri.com/esri/arcgis/2012/05/02/…