My Application no longer starts after switch to SDK 10.1.1

4051
14
Jump to solution
01-17-2013 10:05 AM
JeffAli
New Contributor
My application started fine and displayed my map when I was using 2.0, but after the switch to 10.1.1 it no longer starts. Below is the error log put out by log cat:


01-17 14:51:07.608: W/dalvikvm(12258): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/esri/core/geometry/GeometryEngine;
01-17 14:51:07.608: W/dalvikvm(12258): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/esri/core/geometry/SpatialReference;
01-17 14:51:07.613: D/AndroidRuntime(12258): Shutting down VM
01-17 14:51:07.613: W/dalvikvm(12258): threadid=1: thread exiting with uncaught exception (group=0x40efa930)
01-17 14:51:07.618: E/AndroidRuntime(12258): FATAL EXCEPTION: main
01-17 14:51:07.618: E/AndroidRuntime(12258): java.lang.ExceptionInInitializerError
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.bah.ether.EtherActivity.<init>(EtherActivity.java:76)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at java.lang.Class.newInstanceImpl(Native Method)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at java.lang.Class.newInstance(Class.java:1319)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.os.Looper.loop(Looper.java:137)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at android.app.ActivityThread.main(ActivityThread.java:5039)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at java.lang.reflect.Method.invokeNative(Native Method)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at java.lang.reflect.Method.invoke(Method.java:511)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at dalvik.system.NativeStart.main(Native Method)
01-17 14:51:07.618: E/AndroidRuntime(12258): Caused by: java.lang.ExceptionInInitializerError
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.esri.core.geometry.SpatialReference.<clinit>(Unknown Source)
01-17 14:51:07.618: E/AndroidRuntime(12258):  ... 16 more
01-17 14:51:07.618: E/AndroidRuntime(12258): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.bah.ether-2.apk,libraryPath=/data/app-lib/com.bah.ether-2]: findLibrary returned null
01-17 14:51:07.618: E/AndroidRuntime(12258):  at java.lang.Runtime.loadLibrary(Runtime.java:365)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at java.lang.System.loadLibrary(System.java:535)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.esri.core.internal.util.e$1.initialize(Unknown Source)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.esri.core.geometry.GeometryEngine.a(Unknown Source)
01-17 14:51:07.618: E/AndroidRuntime(12258):  at com.esri.core.geometry.GeometryEngine.<clinit>(Unknown Source)
01-17 14:51:07.618: E/AndroidRuntime(12258):  ... 17 more


Please help.
0 Kudos
1 Solution

Accepted Solutions
GSauers
Occasional Contributor
The new SDK changed the name of some libraries. Try creating a new ArcGIS Android project and navigate to libs->armeabi and copy the libruntimecore_java.so file. Paste the file in the same folder in your project.

That worked for me, hope it helps.

View solution in original post

0 Kudos
14 Replies
GSauers
Occasional Contributor
The new SDK changed the name of some libraries. Try creating a new ArcGIS Android project and navigate to libs->armeabi and copy the libruntimecore_java.so file. Paste the file in the same folder in your project.

That worked for me, hope it helps.
0 Kudos
JeffAli
New Contributor
The new SDK changed the name of some libraries. Try creating a new ArcGIS Android project and navigate to libs->armeabi and copy the libruntimecore_java.so file. Paste the file in the same folder in your project.

That worked for me, hope it helps.


Thanks! This fixed my problem.
0 Kudos
DanO_Neill
Occasional Contributor III
We have a document about converting your 2.0 projects to 10.1.1 which automates the updating of the new libraries. It is not only name changes by API as well. 


  1.     In Eclipse right click on your old project and select ArcGIS Tools > Fix Project Properties

  2.     A Progress Information dialog will show the progress of the upgrade

0 Kudos
JeffAli
New Contributor
We have a document about converting your 2.0 projects to 10.1.1 which automates the updating of the new libraries. It is not only name changes by API as well. 


  1.     In Eclipse right click on your old project and select ArcGIS Tools > Fix Project Properties

  2.     A Progress Information dialog will show the progress of the upgrade



Dan, I saw this in the documentation. However my project did not start out as an ArcGIS project so the option to Fix Project Properties was grayed out. My manual upgrade also reset my Android manifest so that it no longer included permissions for access to the camera. This was odd but easily fixed.
0 Kudos
DanO_Neill
Occasional Contributor III
Dan, I saw this in the documentation. However my project did not start out as an ArcGIS project so the option to Fix Project Properties was grayed out. My manual upgrade also reset my Android manifest so that it no longer included permissions for access to the camera. This was odd but easily fixed.


Hmm, at some point you must have converted it to an ArcGIS project, otherwise why did you need to update the native libraries.  You can convert Android projects to ArcGIS for Android projects using the same right click project approach.  See 'Convert to ArcGIS Project' in the following document.  Let me know if for any reason these tools did not work for you as we want developers to be able to automate through the steps of updated existing projects and/or converting to ArcGIS Android projects.
0 Kudos
JohnAllen
New Contributor III
I exported my project out of Eclipse before I upgraded to ESRI's new Android SDK 10.1.1
After upgrading the SDK I imported my project back into Eclipse.
The option to go to ArcGIS Tool --> fix project properties was greyed out.
I could deploy my app onto my phone but when I called the Activity to access ESRI's basemaps my app would crash. So I did what sauegr01 mentioned in his post above and copied the libruntimecore_java.so file from a new ArcGIS project into my libs --> armeabi folder and then I was able to call the Activity that used ESRI's basemap inside my app.

*Update:My popup views aren't working. My basemap and layers are coming from ArcGIS online.

I tried to installing the popupups-for- viewing sample code and the app crashes when you click on a symbol to view the popup.
0 Kudos
DanO_Neill
Occasional Contributor III
Our feature tools should have recognized your project when you imported the v2.0 project back in.  I will look into this workflow and see if I can figure out why the features have been unavailable to you. 

Concerning popups, the Popup API has changed so there are some refactoring tasks for your project, please take a look at the updated document here to see the API changes. Pay special attention the the new support library requirement and make sure you add it to the sample after you import it. Please share the error log if you continue to get errors with the sample after including the support library.
0 Kudos
JohnAllen
New Contributor III
Follow up...

Dano,

Thanks.

I followed the documentation link you provided as well as did a fresh install of ArcGIS for Android 10.1.1 in Eclipse.

I used the new popup-for-viewing sample code for my old app i was working on and finally got everything working properly.

By using the new popup-for-viewing sample code, my website links work when you click on the site in the popup view.
0 Kudos
DanO_Neill
Occasional Contributor III
Glad you got the sample working.  Concerning updating v2.0 projects to v10.1.1.  The issue seems to be related to our dropping support for Android SDK Version 8 API level 2.2.  The support level is now a minimum of Android SDK level 10 API version 2.3.3.  The following workflow on v2.0 projects will get the feature tool working again: 

1. Right click v2.0 project and select 'Properties'. 
2. Select Android from the list and choose the Android 2.3.3 Target Name.
3. Right click the v2.0 project and select 'ArcGIS Tools > Fix Project Properties'.  It will no longer be grayed out. 
4. Open the projects AndroidManifest.xml file
5. Change the min SDK version to 10, '<uses-sdk android:minSdkVersion="10" />'.

Your project will be updated to work with v10.1.1.
0 Kudos