com.esri.android,Error inflating class com.esri.android.map.MapView

华峰
2023-12-01

新建立helloword project 运行的时候,报错如下:

07-12 07:59:10.085: E/Trace(1962): error opening trace file: No

such file or directory (2)

07-12 07:59:10.085: W/Trace(1962): Unexpected value from

nativeGetEnabledTags: 0

07-12 07:59:10.085: W/Trace(1962): Unexpected value from

nativeGetEnabledTags: 0

07-12 07:59:10.085: W/Trace(1962): Unexpected value from

nativeGetEnabledTags: 0

07-12 07:59:10.175: W/Trace(1962): Unexpected value from

nativeGetEnabledTags: 0

07-12 07:59:10.175: W/Trace(1962): Unexpected value from

nativeGetEnabledTags: 0

07-12 07:59:10.295: W/dalvikvm(1962): Exception

Ljava/lang/UnsatisfiedLinkError; thrown while initializing

Lcom/esri/android/map/MapSurface;

07-12 07:59:10.305: D/AndroidRuntime(1962): Shutting down

VM

07-12 07:59:10.305: W/dalvikvm(1962): threadid=1: thread exiting

with uncaught exception (group=0xb4e14908)

07-12 07:59:10.335: E/AndroidRuntime(1962): FATAL EXCEPTION:

main

07-12 07:59:10.335: E/AndroidRuntime(1962):

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

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.ActivityThread.access$600(ActivityThread.java:141)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.os.Handler.dispatchMessage(Handler.java:99)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.os.Looper.loop(Looper.java:137)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.ActivityThread.main(ActivityThread.java:5039)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

java.lang.reflect.Method.invokeNative(Native

Method)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

java.lang.reflect.Method.invoke(Method.java:511)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

dalvik.system.NativeStart.main(Native Method)

07-12 07:59:10.335: E/AndroidRuntime(1962): Caused by:

android.view.InflateException: Binary XML file line #9: Error

inflating class com.esri.android.map.MapView

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.createView(LayoutInflater.java:613)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.rInflate(LayoutInflater.java:746)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.inflate(LayoutInflater.java:489)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.inflate(LayoutInflater.java:396)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.inflate(LayoutInflater.java:352)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.Activity.setContentView(Activity.java:1881)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.esri.arcgis.android.samples.helloworld.HelloWorld.onCreate(HelloWorld.java:42)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.Activity.performCreate(Activity.java:5104)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)

07-12 07:59:10.335: E/AndroidRuntime(1962):  ...

11 more

07-12 07:59:10.335: E/AndroidRuntime(1962): Caused by:

java.lang.reflect.InvocationTargetException

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

java.lang.reflect.Constructor.constructNative(Native

Method)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

java.lang.reflect.Constructor.newInstance(Constructor.java:417)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

android.view.LayoutInflater.createView(LayoutInflater.java:587)

07-12 07:59:10.335: E/AndroidRuntime(1962):  ...

22 more

07-12 07:59:10.335: E/AndroidRuntime(1962): Caused by:

java.lang.ExceptionInInitializerError

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.esri.android.map.MapView.a(Unknown Source)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.esri.android.map.MapView.(Unknown Source)

07-12 07:59:10.335: E/AndroidRuntime(1962):  ...

25 more

07-12 07:59:10.335: E/AndroidRuntime(1962): Caused by:

java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java from

loader

dalvik.system.PathClassLoader[dexPath=/data/app/com.esri.arcgis.android.samples.helloworld-2.apk,libraryPath=/data/app-lib/com.esri.arcgis.android.samples.helloworld-2]:

findLibrary returned null

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

java.lang.Runtime.loadLibrary(Runtime.java:365)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

java.lang.System.loadLibrary(System.java:535)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.esri.core.internal.util.e$1.initialize(Unknown

Source)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.esri.android.io.a.a(Unknown Source)

07-12 07:59:10.335: E/AndroidRuntime(1962):  at

com.esri.android.map.MapSurface.(Unknown Source)

07-12 07:59:10.335: E/AndroidRuntime(1962):  ...

27 more

修改方式:

1,新建立一个普通工程,把该工程里边的 libs->armeabi->libruntimecore_java.so

复制到helloword工程中对应的目录.

 类似资料: