登录 立即注册
安币:

安卓巴士 - 安卓开发 - Android开发 - 安卓 - 移动互联网门户

Arcgis for android 2.0升级到10.1出异常[复制链接]

本帖最后由 singleman 于 2013-5-6 17:48 编辑

arcgis 升级后 原来的项目初始化失败   
[Java] 查看源文件 复制代码
public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
                mMapView = (MapView) findViewById(R.id.map);
                mMapView.addLayer(new ArcGISDynamicMapServiceLayer(
                                "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));
                // Creates a dynamic layer using service URL
                ArcGISDynamicMapServiceLayer dynamicLayer = new ArcGISDynamicMapServiceLayer(
                                dynamicMapURL);
                // Adds layer into the 'MapView'
                mMapView.addLayer(dynamicLayer);
                // KMLLayer KML = new KMLLayer("url");
                // mMapView.addLayer(KML);
        }

就 mMapView = (MapView) findViewById(R.id.map); 这句话  报错   编译时没有错的,有对这方面有研究的吗
XML文件如下
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    tools:context=".ArcgisKmlActivity"
    >
<!-- MapView layout and initial extent -->
    <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">
          </com.esri.android.map.MapView>
</LinearLayout>

01-01 09:19:36.610: E/NotificationService(1811): Ignoring notification with icon==0: Notification(contentView=null vibrate=null,sound=null,defaults=0x0,flags=0x62)
01-01 09:19:36.770: E/AlarmManagerService(1811): android_server_AlarmManagerService_set to type=0, 946689591.772000000
01-01 09:19:36.935: E/AlarmManagerService(1811): android_server_AlarmManagerService_set to type=0, 946689591.940000000
01-01 09:19:38.040: E/AndroidRuntime(7091): FATAL EXCEPTION: main
01-01 09:19:38.040: E/AndroidRuntime(7091): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.esri.arcgis.android.samples.addlayer/com.esri.arcgis.android.samples.addlayer.AddLayer}: android.view.InflateException: Binary XML file line #8: Error inflating class com.esri.android.map.MapView
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.os.Handler.dispatchMessage(Handler.java:99)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.os.Looper.loop(Looper.java:137)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.ActivityThread.main(ActivityThread.java:4511)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at java.lang.reflect.Method.invokeNative(Native Method)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at java.lang.reflect.Method.invoke(Method.java:511)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:986)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:753)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at dalvik.system.NativeStart.main(Native Method)
01-01 09:19:38.040: E/AndroidRuntime(7091): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.esri.android.map.MapView
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:272)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.Activity.setContentView(Activity.java:1835)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.esri.arcgis.android.samples.addlayer.AddLayer.onCreate(AddLayer.java:38)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.Activity.performCreate(Activity.java:4470)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-01 09:19:38.040: E/AndroidRuntime(7091):         ... 11 more
01-01 09:19:38.040: E/AndroidRuntime(7091): Caused by: java.lang.reflect.InvocationTargetException
01-01 09:19:38.040: E/AndroidRuntime(7091):         at java.lang.reflect.Constructor.constructNative(Native Method)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-01 09:19:38.040: E/AndroidRuntime(7091):         ... 22 more
01-01 09:19:38.040: E/AndroidRuntime(7091): Caused by: java.lang.ExceptionInInitializerError
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.esri.android.map.MapView.a(Unknown Source)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.esri.android.map.MapView.<init>(Unknown Source)
01-01 09:19:38.040: E/AndroidRuntime(7091):         ... 25 more
01-01 09:19:38.040: E/AndroidRuntime(7091): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java: findLibrary returned null
01-01 09:19:38.040: E/AndroidRuntime(7091):         at java.lang.Runtime.loadLibrary(Runtime.java:365)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at java.lang.System.loadLibrary(System.java:535)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.esri.core.internal.util.e$1.initialize(Unknown Source)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.esri.android.io.a.a(Unknown Source)
01-01 09:19:38.040: E/AndroidRuntime(7091):         at com.esri.android.map.MapSurface.<clinit>(Unknown Source)
01-01 09:19:38.040: E/AndroidRuntime(7091):         ... 27 more
01-01 09:19:38.065: E/android.os.Debug(1811): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
01-01 09:19:38.135: E/Watchdog(1811): !@Sync 74
01-01 09:19:38.610: E/Launcher(2147): Error finding setting, default accessibility to not found: accessibility_enabled
01-01 09:19:38.610: E/ActivityThread(2147): Failed to find provider info for com.samsung.helphub.provider
01-01 09:19:39.370: E/lights(1811): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 1
01-01 09:19:40.875: E/lights(1811): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 2
01-01 09:19:41.915: E/AlarmManagerService(1811): android_server_AlarmManagerService_set to type=3, 2258.758000000
01-01 09:19:51.935: E/AlarmManagerService(1811): android_server_AlarmManagerService_set to type=0, 946689665.133000000
01-01 09:19:59.995: E/AlarmManagerService(1811): android_server_AlarmManagerService_set to type=3, 2300.701000000
01-01 09:20:08.135: E/Watchdog(1811): !@Sync 75

singleman 115239查看 · 4回复 · 2013-5-6 17:44 有用(0
共5个回答
wenzhao198903 2013-6-7 15:52 回复
.........LZ
拜求问题怎么解决的  {:soso_e101:}
singleman 2013-6-8 17:31 回复
wenzhao198903 发表于 2013-6-7 15:52
.........LZ
拜求问题怎么解决的

有可能是arcgis自身的原因吧,我是在一个没有装过arcgis插件的eclipse重新装10.1,就好了
wwbbbluesky 2014-1-3 16:45 回复
项目的属性---ARcgis tools---Convert to ArcGIS Android project ,问题搞定。{:6_160:}
shaolong9006 2014-7-30 20:03 回复
工程编译不报错,说明导入成功,这个问题 其实相当于Application没有更新,只需点击工程右击 选择 ARCGIS里的fix一下就好
需要登入后才可以评论 登录 | 立即注册

联系我们
关闭
合作电话:
13802416937
Email:
435399051@qq.com
商务市场合作/投稿
问题反馈及帮助
联系我们

广告投放| 下载客户端|申请友链|手机版|站点统计|安卓巴士 ( 粤ICP备15117877号 )

返回顶部 返回版块