0

我有一个示例应用程序 Android 2.1 google maps(2.1) 应用程序。当我运行该文件时,我遇到了一个我无法修复的错误,需要一些帮助。我不完全确定问题出在哪里,所以这是我在活动中创建的代码。

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mapView = (MapView)findViewById(R.id.mapView);
        mapView.setBuiltInZoomControls(true);
        mapView.setSatellite(false);
        mapView.setStreetView(true);
        mapController = mapView.getController();
        mapController.setZoom(13);
        getLastLocation();
        animateToCurrentLocation();
        //added to include overlays in here
        //List<Overlay> mapOverlays = mapView.getOverlays();
        //Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker);
        //MapItemizedOverlay itemizedoverlay = new MapItemizedOverlay(drawable, this);
        //GeoPoint coordinates are specified in microdegrees (degrees * 1e6). The OverlayItem constructor accepts the 
        //GeoPoint location, a string for the item's title, and a string for the item's snippet text, respectively.
        //GeoPoint point = new GeoPoint(19240000,-99120000);
        //OverlayItem overlayitem = new OverlayItem(point, "Hola, Mundo!", "I'm in Mexico City!");
        //try adding another one 
        //GeoPoint point2 = new GeoPoint(35410000, 139460000);
        //OverlayItem overlayitem2 = new OverlayItem(point2, "Sekai, konichiwa!", "I'm in Japan!");
        //All that's left is to add this OverlayItem to your collection in the MapItemizedOverlay
        //instance, then add the HelloItemizedOverlay to the MapView:
        //itemizedoverlay.addOverlay(overlayitem);
        //itemizedoverlay.addOverlay(overlayitem2);
        //mapOverlays.add(itemizedoverlay);
    } 

08-04 20:03:05.144: E/ActivityThread(229): 找不到 com.google.settings 的提供者信息

08-04 20:03:06.765: E/MapActivity(229): 无法获取连接工厂客户端

 [2012-08-04 17:38:41 - com.shawnbe.mallfinder.MallFinderActivity] ------------------------------
    [2012-08-04 17:38:41 - com.shawnbe.mallfinder.MallFinderActivity] Android Launch!
    [2012-08-04 17:38:41 - com.shawnbe.mallfinder.MallFinderActivity] adb is running normally.
    [2012-08-04 17:38:41 - com.shawnbe.mallfinder.MallFinderActivity] Performing com.shawnbe.mallfinder.MallFinderActivity activity launch
    [2012-08-04 17:38:41 - com.shawnbe.mallfinder.MallFinderActivity] Automatic Target Mode: launching new emulator with compatible AVD 'MAPPAPI2'
    [2012-08-04 17:38:41 - com.shawnbe.mallfinder.MallFinderActivity] Launching a new emulator with Virtual Device 'MAPPAPI2'
    [2012-08-04 17:38:42 - com.shawnbe.mallfinder.MallFinderActivity] New emulator found: emulator-5554
    [2012-08-04 17:38:42 - com.shawnbe.mallfinder.MallFinderActivity] Waiting for HOME ('android.process.acore') to be launched...
    [2012-08-04 17:39:36 - com.shawnbe.mallfinder.MallFinderActivity] HOME is up on device 'emulator-5554'
    [2012-08-04 17:39:36 - com.shawnbe.mallfinder.MallFinderActivity] Uploading com.shawnbe.mallfinder.MallFinderActivity.apk onto device 'emulator-5554'
    [2012-08-04 17:39:46 - com.shawnbe.mallfinder.MallFinderActivity] Failed to install com.shawnbe.mallfinder.MallFinderActivity.apk on device 'emulator-5554': timeout
    [2012-08-04 17:39:46 - com.shawnbe.mallfinder.MallFinderActivity] Launch canceled!
4

1 回答 1

0

我对 Android 还是很陌生,所以很遗憾我无法解释这些错误,但我的应用程序中出现了相同的错误,但没有它们导致安装失败。

有时重新启动 AVD 为我解决了安装失败的问题,但我不知道原因。

于 2012-08-04T23:05:14.227 回答