ArcGIS 10.1.1 libGLMapCore.so

时间:2013-05-30 18:01:18

标签: android arcgis esri

刚刚将我的应用升级到适用于Android的ArcGIS 10.1.1版,并开始出现运行时错误。如果我将libGLMapCore.so文件添加到项目libs-> armeabi目录中,问题就会消失,程序运行正常。

这个文件不在ArgGIS示例HelloWorld中,所以我想知道为什么我的项目需要它。如果有人能帮我解决这个问题,我将不胜感激。 (仅供参考 - 我试图从ESRI示例中复制libs文件夹,但它没有帮助。)下面是我没有libGLMapCore.so文件的堆栈跟踪。

05-30 12:53:42.117: E/Trace(1738): error opening trace file: No such file or directory (2)
05-30 12:53:42.507: W/dalvikvm(1738): Exception Ljava/lang/UnsatisfiedLinkError; thrown  while initializing Lcom/esri/android/map/MapSurface;
05-30 12:53:42.507: D/AndroidRuntime(1738): Shutting down VM
05-30 12:53:42.507: W/dalvikvm(1738): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-30 12:53:42.527: E/AndroidRuntime(1738): FATAL EXCEPTION: main
05-30 12:53:42.527: E/AndroidRuntime(1738): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.baseops.airsuitability.main/com.baseops.airsuitability.main.AirfieldSuitabilityMain}: android.view.InflateException: Binary XML file line #8: Error inflating class com.esri.android.map.MapView
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.os.Looper.loop(Looper.java:137)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.ActivityThread.main(ActivityThread.java:5041)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at java.lang.reflect.Method.invokeNative(Native Method)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at java.lang.reflect.Method.invoke(Method.java:511)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at dalvik.system.NativeStart.main(Native Method)
05-30 12:53:42.527: E/AndroidRuntime(1738): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.esri.android.map.MapView
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.Activity.setContentView(Activity.java:1881)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.baseops.airsuitability.main.AirfieldSuitabilityMain.onCreate(AirfieldSuitabilityMain.java:73)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.Activity.performCreate(Activity.java:5104)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
05-30 12:53:42.527: E/AndroidRuntime(1738):     ... 11 more
05-30 12:53:42.527: E/AndroidRuntime(1738): Caused by: java.lang.reflect.InvocationTargetException
05-30 12:53:42.527: E/AndroidRuntime(1738):     at java.lang.reflect.Constructor.constructNative(Native Method)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at android.view.LayoutInflater.createView(LayoutInflater.java:587)
05-30 12:53:42.527: E/AndroidRuntime(1738):     ... 22 more
05-30 12:53:42.527: E/AndroidRuntime(1738): Caused by: java.lang.ExceptionInInitializerError
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.esri.android.map.MapView.a(Unknown Source)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.esri.android.map.MapView.<init>(Unknown Source)
05-30 12:53:42.527: E/AndroidRuntime(1738):     ... 25 more
05-30 12:53:42.527: E/AndroidRuntime(1738): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load GLMapCore from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.baseops.airsuitability.main-1.apk,libraryPath=/data/app-lib/com.baseops.airsuitability.main-1]: findLibrary returned null
05-30 12:53:42.527: E/AndroidRuntime(1738):     at java.lang.Runtime.loadLibrary(Runtime.java:365)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at java.lang.System.loadLibrary(System.java:535)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.esri.android.a.a.a(Unknown Source)
05-30 12:53:42.527: E/AndroidRuntime(1738):     at com.esri.android.map.MapSurface.<clinit>(Unknown Source)
05-30 12:53:42.527: E/AndroidRuntime(1738):     ... 27 more

1 个答案:

答案 0 :(得分:1)

我认为当您在非ArcGIS项目中使用插件时,这只是ArcGIS的一个错误。虽然,这可能只是Eclipse的一个问题。当您使用Java库时,它不会复制本机库...我不确定它会对任何库执行此操作。但是MapSurface类正在尝试使用本机库而它不在那里......所以如果Eclipse不为你做的话,你 HAVE 就可以添加它。

我遇到了同样的问题。我在arcGIS论坛上发现了一篇帖子,指出我的项目中缺少ArcGIS本机库.so文件。就像你似乎已经完成的那样,我做了以下工作将原生库复制到我的项目中,现在它链接并创建了一个Map对象:

  • 使用SDK ArcGIS Project for Android向导创建新项目
  • 将本地库从新项目复制到现有项目。例如。 $ //库/ armeabi(-v7a)/libruntimecore_java.so。请记住,此文件名已在v10.1.1更改。
  • 右键单击原始项目,然后选择“属性”
  • 选择Java Build Path&gt;订单和导出选项卡 确认已导出ArcGIS for Android 10.1.1类路径容器

希望这会有所帮助。这是论坛的链接:http://forums.arcgis.com/threads/87407-Error-inflating-class-com.esri.android.map.MapView?highlight=exception