刚刚将我的应用程序升级到适用于 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