Binary XML file line #6: Error inflating class com.esri.android.map.MapView

今天上午搞了一上午这个错误终于解决了!先贴出异常来吧:


10-18 10:47:35.210: ERROR/AndroidRuntime(15412): FATAL EXCEPTION: main
10-18 10:47:35.210: ERROR/AndroidRuntime(15412): 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 #6: Error inflating class com.esri.android.map.MapView
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1969)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1994)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.ActivityThread.access$600(ActivityThread.java:126)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1150)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.os.Looper.loop(Looper.java:137)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.ActivityThread.main(ActivityThread.java:4439)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at java.lang.reflect.Method.invokeNative(Native Method)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at java.lang.reflect.Method.invoke(Method.java:511)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at dalvik.system.NativeStart.main(Native Method)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class com.esri.android.map.MapView
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.createView(LayoutInflater.java:606)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.rInflate(sLayoutInflater.java:739)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:253)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.Activity.setContentView(Activity.java:1841)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.esri.arcgis.android.samples.helloworld.HelloWorld.onCreate(HelloWorld.java:40)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.Activity.performCreate(Activity.java:4471)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1933)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     ... 11 more
10-18 10:47:35.210: ERROR/AndroidRuntime(15412): Caused by: java.lang.reflect.InvocationTargetException
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at java.lang.reflect.Constructor.constructNative(Native Method)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at android.view.LayoutInflater.createView(LayoutInflater.java:586)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     ... 22 more
10-18 10:47:35.210: ERROR/AndroidRuntime(15412): Caused by: java.lang.ExceptionInInitializerError
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.esri.android.map.MapView.a(Unknown Source)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.esri.android.map.MapView.<init>(Unknown Source)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     ... 25 more
10-18 10:47:35.210: ERROR/AndroidRuntime(15412): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java: findLibrary returned null
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at java.lang.Runtime.loadLibrary(Runtime.java:365)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at java.lang.System.loadLibrary(System.java:535)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.esri.core.internal.util.e$1.initialize(Unknown Source)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.esri.android.io.a.a(Unknown Source)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     at com.esri.android.map.MapSurface.<clinit>(Unknown Source)
10-18 10:47:35.210: ERROR/AndroidRuntime(15412):     ... 27 more
10-18 10:47:35.210: WARN/ActivityManager(315):   Force finishing activity com.esri.arcgis.android.samples.helloworld/.HelloWorld
10-18 10:47:35.340: INFO/ActivityManager(315): Start proc com.android.quicksearchbox for broadcast com.android.quicksearchbox/.CorporaUpdateReceiver: pid=15431 uid=10038 gids={3003}
10-18 10:47:35.340: INFO/ActivityManager(315): No longer want com.miui.weather2 (pid 15099): hidden #16

出现这个错误主要是底层没有对mapview进行定义,异常说我com.esri.android.map.MapView 没有定义


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    <com.esri.android.map.MapView
        android:id="@+id/map" 
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        initExtent="-19332033.11,-3516.27,-1720941.80,11737211.28"/>
</LinearLayout>


所以这样就简单了,说明我们还有需要的东西需要导入进行定义底层的mapview,也就是.so文件楼.

所以要将ArcGISAndroidSDK_v10.1.1-u1/plugins/com.esri.arcgis.android.samples_10.1.1.201306271100.jar文件解压,解压出来的有jar包,还有sample!

我是用的里面的helloword里面的demo,但是里面只有jar包没有.so文件,

.so文件添加:

ArcGISAndroidSDK_v10.1.1-u1\plugins这个路径下利用rar解压com.esri.arcgis.android.core_10.1.1.201306271100.jar

解压之后就会得到lib,libs两个文件,jar包我们刚才已经得到,我们现在需要的是libs里面的armeabi,armeabi-v7a里面的两个文件,

把这两个文件夹都拷贝到我们的工程目录下,直接放到那里面,编译部署即可!



http://download.csdn.net/detail/xiaogezq0/6419553 (helloword demo)


http://download.csdn.net/detail/xiaogezq0/6419611(两个libruntimecore_java.so文件)



http://download.csdn.net/detail/xiaogezq0/6419611(arcgis jar包)


http://download.csdn.net/detail/xiaogezq0/6419627 ( arcgis for android api)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念
xml文件介绍及使用
xml编程(一)-xml语法
XML文件结构和基本语法
第2章 包装类
XML入门的常见问题(二)
Java对象的强、软、弱和虚引用
JS解析XML文件和XML字符串详解
java中枚举的详细使用介绍
了解Xml格式
XML入门的常见问题(四)
深入SQLite多线程的使用总结详解
PlayFramework完整实现一个APP(一)
XML和YAML的使用方法
XML轻松学习总节篇