在测试esri arcgis for android的第一个程序Helloworld的时候,报这样的错:
完整错误log为:
1 12-13 18:50:15.619: W/dalvikvm(21282): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/esri/android/map/MapSurface; 2 12-13 18:50:15.619: W/dalvikvm(21282): threadid=1: thread exiting with uncaught exception (group=0x4010c560) 3 12-13 18:50:15.639: E/AndroidRuntime(21282): FATAL EXCEPTION: main 4 12-13 18:50:15.639: E/AndroidRuntime(21282): 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 5 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 6 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 7 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 8 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 9 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.os.Handler.dispatchMessage(Handler.java:99) 10 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.os.Looper.loop(Looper.java:130) 11 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.ActivityThread.main(ActivityThread.java:3683) 12 12-13 18:50:15.639: E/AndroidRuntime(21282): at java.lang.reflect.Method.invokeNative(Native Method) 13 12-13 18:50:15.639: E/AndroidRuntime(21282): at java.lang.reflect.Method.invoke(Method.java:507) 14 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875) 15 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633) 16 12-13 18:50:15.639: E/AndroidRuntime(21282): at dalvik.system.NativeStart.main(Native Method) 17 12-13 18:50:15.639: E/AndroidRuntime(21282): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.android.map.MapView 18 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.createView(LayoutInflater.java:518) 19 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 20 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 21 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 22 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 23 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 24 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:208) 25 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.Activity.setContentView(Activity.java:1657) 26 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.esri.arcgis.android.samples.helloworld.HelloWorld.onCreate(HelloWorld.java:41) 27 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 28 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 29 12-13 18:50:15.639: E/AndroidRuntime(21282): ... 11 more 30 12-13 18:50:15.639: E/AndroidRuntime(21282): Caused by: java.lang.reflect.InvocationTargetException 31 12-13 18:50:15.639: E/AndroidRuntime(21282): at java.lang.reflect.Constructor.constructNative(Native Method) 32 12-13 18:50:15.639: E/AndroidRuntime(21282): at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 33 12-13 18:50:15.639: E/AndroidRuntime(21282): at android.view.LayoutInflater.createView(LayoutInflater.java:505) 34 12-13 18:50:15.639: E/AndroidRuntime(21282): ... 21 more 35 12-13 18:50:15.639: E/AndroidRuntime(21282): Caused by: java.lang.ExceptionInInitializerError 36 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.esri.android.map.MapView.a(Unknown Source) 37 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.esri.android.map.MapView.<init>(Unknown Source) 38 12-13 18:50:15.639: E/AndroidRuntime(21282): ... 24 more 39 12-13 18:50:15.639: E/AndroidRuntime(21282): Caused by: java.lang.UnsatisfiedLinkError: Couldn‘t load runtimecore_java: findLibrary returned null 40 12-13 18:50:15.639: E/AndroidRuntime(21282): at java.lang.Runtime.loadLibrary(Runtime.java:429) 41 12-13 18:50:15.639: E/AndroidRuntime(21282): at java.lang.System.loadLibrary(System.java:554) 42 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.esri.core.internal.RuntimeHelper.a(Unknown Source) 43 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.esri.core.internal.RuntimeHelper.initialize(Unknown Source) 44 12-13 18:50:15.639: E/AndroidRuntime(21282): at com.esri.android.map.MapSurface.<clinit>(Unknown Source) 45 12-13 18:50:15.639: E/AndroidRuntime(21282): ... 26 more
我的解决方案是在项目->Properties->Java Build Path->Order and Export上,勾上android sdk即可,ref:http://gis.stackexchange.com/questions/66089/arcgis-android-helloworld-mapview-inflateexception
时间: 2024-10-27 23:00:15