Arcgis MapView 在膨胀 MapView 时在某些设备(我相信是 64 位)上提供错误。
错误开始于
Binary XML file line #13: Binary XML file line #13: Error inflating class com.esri.android.map.MapView
在最后一行:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.labs.arctest-1/base.apk"],nativeLibraryDirectories=[/data/app/com.labs.arctest-1/lib/arm64, /data/app/com.labs.arctest-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libruntimecore_java.so"
在某些情况下,它似乎找不到库。
弧形版本:
compile 'com.esri.arcgis.android:arcgis-android:10.2.7'
简单的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.labs.arctest.MainActivity">
<com.esri.android.map.MapView
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
mapoptions.MapType="Streets"
>
</com.esri.android.map.MapView>
</RelativeLayout>
完整的日志:
07-15 03:35:52.338 27987 27987 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.labs.arctest/com.labs.arctest.MainActivity}: android.view.InflateException: Binary XML file line #13: Binary XML file line #13: Error inflating class com.esri.android.map.MapView
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2452)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.ActivityThread.access$900(ActivityThread.java:154)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.os.Looper.loop(Looper.java:152)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5497)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #13: Binary XML file line #13: Error inflating class com.esri.android.map.MapView
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at com.labs.arctest.MainActivity.onCreate(MainActivity.java:27)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6285)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2405)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: ... 9 more
07-15 03:35:52.338 27987 27987 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class com.esri.android.map.MapView
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:645)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: ... 17 more
07-15 03:35:52.338 27987 27987 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:619)
07-15 03:35:52.338 27987 27987 E AndroidRuntime: ... 22 more
07-15 03:35:52.338 27987 27987 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.labs.arctest-1/base.apk"],nativeLibraryDirectories=[/data/app/com.labs.arctest-1/lib/arm64, /data/app/com.labs.arctest-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libruntimecore_java.so"