Android 你好,世界地图(ArcGIS)-Eclipse';s Emulator不';t无法正确运行ArcGIS应用程序

Android 你好,世界地图(ArcGIS)-Eclipse';s Emulator不';t无法正确运行ArcGIS应用程序,android,eclipse,emulation,arcgis,Android,Eclipse,Emulation,Arcgis,我遵循这个步骤。我将我的项目命名为“HelloWorld3”,而不是“HelloWorld”。我仔细地遵循了所有步骤,并在我的“HelloWorldActivity.java”中删除了已经存在的内容(默认情况下),如下所示: package com.esri.arcgis.android.samples.helloworld3; import android.app.Activity; import android.os.Bundle; import com.esri.android.ma

我遵循这个步骤。我将我的项目命名为“HelloWorld3”,而不是“HelloWorld”。我仔细地遵循了所有步骤,并在我的“HelloWorldActivity.java”中删除了已经存在的内容(默认情况下),如下所示:

package com.esri.arcgis.android.samples.helloworld3;

import android.app.Activity;
import android.os.Bundle;


import com.esri.android.map.MapView;


public class HelloWorld3Activity extends Activity {

    MapView mMapView ;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mMapView = new MapView(this);

    }

    @Override 
    protected void onDestroy() { 
        super.onDestroy();
 }
    @Override
    protected void onPause() {
        super.onPause();
        mMapView.pause();
 }
    @Override   protected void onResume() {
        super.onResume(); 
        mMapView.unpause();
    }

}
我更改了以前的代码,并将此代码改为:

public class HelloWorldActivity extends Activity {
    MapView map = null;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Retrieve the map and initial extent from XML layout
        map = (MapView)findViewById(R.id.map);
        // Add dynamic layer to MapView
        map.addLayer(new ArcGISTiledMapServiceLayer("" +
        "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));

    }

    protected void onPause() {
        super.onPause();
        map.pause();
    }

    protected void onResume() {
        super.onResume();
        map.unpause();
    }
}
(我遵循了教程中提到的内容,但我绝对将其命名为“HelloWorld3活动”)

然后,我的代码变成这样:

package com.esri.arcgis.android.samples.helloworld3;

import android.app.Activity;
import android.os.Bundle;


import com.esri.android.map.MapView;


public class HelloWorld3Activity extends Activity {

    MapView map = null;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Retrieve the map and initial extent from XML layout
        map = (MapView)findViewById(R.id.map);
        // Add dynamic layer to MapView
        map.addLayer(new ArcGISTiledMapServiceLayer("" +
        "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));

    }

    protected void onPause() {
        super.onPause();
        map.pause();
    }

    protected void onResume() {
        super.onResume();
        map.unpause();
    }

}
package com.esri.arcgis.android.samples.helloworld3;

import android.app.Activity;
import android.os.Bundle;

import com.esri.android.map.MapView;
import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;


public class HelloWorld3Activity extends Activity {

    MapView map = null;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Retrieve the map and initial extent from XML layout
        map = (MapView)findViewById(R.id.map);
        // Add dynamic layer to MapView
        map.addLayer(new ArcGISTiledMapServiceLayer("" +
        "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));

    }

    protected void onPause() {
        super.onPause();
        map.pause();
    }

    protected void onResume() {
        super.onResume();
        map.unpause();
    }

}
但是,“ArcGISTiledMapServiceLayer”下有一条红色下划线

有什么问题?!我不知道该怎么办

我试图通过单击Ctrl+Shift+O>>来更新丢失的导入来解决问题(希望它能解决问题)。 红色下划线消失了,我的代码变成这样:

package com.esri.arcgis.android.samples.helloworld3;

import android.app.Activity;
import android.os.Bundle;


import com.esri.android.map.MapView;


public class HelloWorld3Activity extends Activity {

    MapView map = null;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Retrieve the map and initial extent from XML layout
        map = (MapView)findViewById(R.id.map);
        // Add dynamic layer to MapView
        map.addLayer(new ArcGISTiledMapServiceLayer("" +
        "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));

    }

    protected void onPause() {
        super.onPause();
        map.pause();
    }

    protected void onResume() {
        super.onResume();
        map.unpause();
    }

}
package com.esri.arcgis.android.samples.helloworld3;

import android.app.Activity;
import android.os.Bundle;

import com.esri.android.map.MapView;
import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;


public class HelloWorld3Activity extends Activity {

    MapView map = null;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Retrieve the map and initial extent from XML layout
        map = (MapView)findViewById(R.id.map);
        // Add dynamic layer to MapView
        map.addLayer(new ArcGISTiledMapServiceLayer("" +
        "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));

    }

    protected void onPause() {
        super.onPause();
        map.pause();
    }

    protected void onResume() {
        super.onResume();
        map.unpause();
    }

}
之后,我试着运行它。我右键单击我的项目“HelloWorld3”,然后单击RunAs>Android应用程序。 模拟器启动了,我找到了我的应用程序的图标。但是,当我点击它时,这个屏幕(或窗口)出现了

怎么了?! 请帮帮我

***这是我之前的相关问题“”

我不确定,但我认为这是一个逻辑:

10-17 12:38:19.820: I/dalvikvm(557): threadid=3: reacting to signal 3
10-17 12:38:19.871: I/dalvikvm(557): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:19.911: D/dalvikvm(557): Trying to load lib /data/data/com.esri.arcgis.android.samples.helloworld3/lib/libGLMapCore.so 0x412a6680
10-17 12:38:20.320: I/dalvikvm(557): threadid=3: reacting to signal 3
10-17 12:38:20.371: I/dalvikvm(557): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:20.582: D/dalvikvm(557): Added shared lib /data/data/com.esri.arcgis.android.samples.helloworld3/lib/libGLMapCore.so 0x412a6680
10-17 12:38:20.601: W/ApplicationContext(557): Unable to create external cache directory
10-17 12:38:20.820: I/dalvikvm(557): threadid=3: reacting to signal 3
10-17 12:38:20.851: I/dalvikvm(557): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:21.711: W/ApplicationContext(557): Unable to create external cache directory
10-17 12:38:22.021: D/libEGL(557): Emulator without GPU support detected. Fallback to software renderer.
10-17 12:38:22.021: D/libEGL(557): loaded /system/lib/egl/libGLES_android.so
10-17 12:38:22.101: W/dalvikvm(557): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
10-17 12:38:22.122: D/gralloc_goldfish(557): Emulator without GPU emulation detected.
10-17 12:38:22.132: E/AndroidRuntime(557): FATAL EXCEPTION: GLThread 75
10-17 12:38:22.132: E/AndroidRuntime(557): java.lang.IllegalArgumentException: No configs match configSpec
10-17 12:38:22.132: E/AndroidRuntime(557):  at com.esri.android.map.MapSurface$a.chooseConfig(Unknown Source)
10-17 12:38:22.132: E/AndroidRuntime(557):  at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1009)
10-17 12:38:22.132: E/AndroidRuntime(557):  at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1362)
10-17 12:38:22.132: E/AndroidRuntime(557):  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
10-17 12:38:29.820: D/dalvikvm(557): GC_CONCURRENT freed 320K, 5% free 9217K/9607K, paused 6ms+8ms
10-17 12:38:31.741: I/Process(557): Sending signal. PID: 557 SIG: 9
10-17 12:38:38.980: I/dalvikvm(585): threadid=3: reacting to signal 3
10-17 12:38:39.121: I/dalvikvm(585): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:39.371: D/dalvikvm(585): Trying to load lib /data/data/com.esri.arcgis.android.samples.helloworld3/lib/libGLMapCore.so 0x4129e4c8
10-17 12:38:39.490: I/dalvikvm(585): threadid=3: reacting to signal 3
10-17 12:38:39.532: I/dalvikvm(585): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:39.892: D/dalvikvm(585): Added shared lib /data/data/com.esri.arcgis.android.samples.helloworld3/lib/libGLMapCore.so 0x4129e4c8
10-17 12:38:39.900: W/ApplicationContext(585): Unable to create external cache directory
10-17 12:38:40.001: I/dalvikvm(585): threadid=3: reacting to signal 3
10-17 12:38:40.033: I/dalvikvm(585): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:40.501: I/dalvikvm(585): threadid=3: reacting to signal 3
10-17 12:38:40.530: W/ApplicationContext(585): Unable to create external cache directory
10-17 12:38:40.562: I/dalvikvm(585): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:40.780: D/libEGL(585): Emulator without GPU support detected. Fallback to software renderer.
10-17 12:38:40.780: D/libEGL(585): loaded /system/lib/egl/libGLES_android.so
10-17 12:38:40.911: D/gralloc_goldfish(585): Emulator without GPU emulation detected.
10-17 12:38:40.921: W/dalvikvm(585): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
10-17 12:38:40.971: E/AndroidRuntime(585): FATAL EXCEPTION: GLThread 78
10-17 12:38:40.971: E/AndroidRuntime(585): java.lang.IllegalArgumentException: No configs match configSpec
10-17 12:38:40.971: E/AndroidRuntime(585):  at com.esri.android.map.MapSurface$a.chooseConfig(Unknown Source)
10-17 12:38:40.971: E/AndroidRuntime(585):  at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1009)
10-17 12:38:40.971: E/AndroidRuntime(585):  at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1362)
10-17 12:38:40.971: E/AndroidRuntime(585):  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
10-17 12:38:41.011: I/dalvikvm(585): threadid=3: reacting to signal 3
10-17 12:38:41.041: I/dalvikvm(585): Wrote stack traces to '/data/anr/traces.txt'
10-17 12:38:42.511: D/dalvikvm(585): GC_CONCURRENT freed 306K, 4% free 9231K/9607K, paused 20ms+123ms
10-17 12:38:54.530: I/Process(585): Sending signal. PID: 585 SIG: 9

当ArcGIS API for Android最初发布时,由于缺少OpenGL ES 2.0支持,仿真器将不支持它。但是,情况已发生变化。请查看。您可能需要对目标环境进行一些更改/安装一些其他软件包。

请发布崩溃日志以进一步调查此问题。