Binary XML file : Error inflating class com.esri.android.map.MapView
2023-09-27 14:28:06 时间
在测试esri arcgis for android的第一个程序Helloworld的时候,报这样的错:
Binary XML file : Error inflating class com.esri.android.map.MapView
完整错误log为:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
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
相关文章
- Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException总结
- android学习教程!你了解过移动端适配吗?这原因我服了
- Android中asset文件夹和raw文件夹区别与用法
- android studio 第一个真机调试
- Android中的三种XML解析方式
- android com.handmark.pulltorefresh 使用技巧
- 【Android】Eclipse快捷键精选
- Android 在xml和java代码中设置控件的style
- Android手势缩放图片
- Android 画虚线边框
- The SDK directory '/root/android-sdk' does not exist.”的解决方案
- android 状态栏(StatusBar)
- 【Android 电量优化】电量优化 ( JobScheduler | JobService | AsyncTask )
- android的hwc浅析【转】
- android 百度地图Map的4.9E-324问题
- 【我的Android进阶之旅】Android Studio如何轻松整理字符串到string.xml中
- 发现----Android Demo
- 我的Android进阶之旅------>Android用PopupWindow实现弹出菜单实例