我有一个示例应用程序Android 2.1谷歌地图(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!
答案 0 :(得分:0)
我对Android仍然很新,所以很遗憾我无法解释错误,但是我的应用程序中出现了相同的错误,但没有导致安装失败。
有时重新启动AVD已经解决了我的安装失败问题,但我不知道原因。