在Android环境中加载ESRI地图时出现此错误。 ESRI的.1 Alpha SDK没有发生这种情况,但它确实发生了1.0.0 SDK。
我知道它与OpenGL lib有关,但似乎无法找到解决方案。我正在使用最新的Android环境运行摩托罗拉Xoom平板电脑..
它也使用片段,因此可能与它有关。
这是我的堆栈转储
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): FATAL EXCEPTION: main
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): java.lang.RuntimeException: Unable to start activity ComponentInfo{c.map.EsriMapWidget}: android.view.InflateException: Binary XML file line #13: Error inflating class com.esri.android.map.MapView
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1818)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.ActivityThread.access$500(ActivityThread.java:122)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.os.Handler.dispatchMessage(Handler.java:99)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.os.Looper.loop(Looper.java:132)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.ActivityThread.main(ActivityThread.java:4126)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at java.lang.reflect.Method.invokeNative(Native Method)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at java.lang.reflect.Method.invoke(Method.java:491)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at dalvik.system.NativeStart.main(Native Method)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class com.esri.android.map.MapView
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.createView(LayoutInflater.java:596)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:671)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at .map.EsriMapFragment.onCreateView(EsriMapFragment.java:21)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:714)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:912)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:990)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:257)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:660)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:245)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.Activity.setContentView(Activity.java:1786)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at .map.EsriMapWidget.onCreate(EsriMapWidget.java:155)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): ... 11 more
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): Caused by: java.lang.reflect.InvocationTargetException
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at java.lang.reflect.Constructor.constructNative(Native Method)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at java.lang.reflect.Constructor.newInstance(Constructor.java:416)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at android.view.LayoutInflater.createView(LayoutInflater.java:576)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): ... 31 more
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): Caused by: java.lang.ExceptionInInitializerError
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.esri.android.map.MapView.a(Unknown Source)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.esri.android.map.MapView.<init>(Unknown Source)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): ... 34 more
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): Caused by: java.lang.ExceptionInInitializerError
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.esri.android.map.MapSurface.<clinit>(Unknown Source)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): ... 36 more
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load GLMapCore: findLibrary returned null
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at java.lang.Runtime.loadLibrary(Runtime.java:425)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at java.lang.System.loadLibrary(System.java:554)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): at com.esri.android.map.Layer.<clinit>(Unknown Source)
01-24 14:20:31.290: ERROR/AndroidRuntime(4370): ... 37 more
答案 0 :(得分:4)
我的修复方法是打开一个示例ArcGIS应用程序(在Eclipse中,文件&gt;新建&gt;其他&gt; ArcGIS for Android&gt; ArcGIS Samples for Android)并将lib文件夹复制到我的项目中。
答案 1 :(得分:0)
对我有用的不同解决方案:右键单击项目并选择'ArcGIS Tools - &gt; Conver到ArcGIS for Android项目'。然后再次右键单击,这次选择'ArcGIS Tools - &gt;修复项目属性'。