我想學習一些我的android手機的編程。 我成功地做了你好世界的應用程序。 現在我想嘗試的MapView在這裏找到:http://developer.android.com/resources/tutorials/views/hello-mapview.html谷歌地圖視圖運行時出錯 - Droid
我的代碼如下:
package com.example.hellomapview;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.ZoomControls;
import com.google.android.maps.*;
public class HelloMapView extends MapActivity {
/** Called when the activity is first created. */
LinearLayout linearLayout;
MapView mapView;
ZoomControls mZoom;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mZoom = (ZoomControls) mapView.getZoomControls();
linearLayout.addView(mZoom);
setContentView(R.layout.main);
}
protected boolean isRouteDisplayed() { return false;}
}
我使用Eclipse和我有SDK和AVD全部安裝正確,但只要我做一個運行>在Eclipse中運行它開始了與OK:
[2010-01-15 12:27:03 - HelloMapView]New emulator found: emulator-5554
[2010-01-15 12:27:03 - HelloMapView]Waiting for HOME ('android.process.acore') to be launched...
[2010-01-15 12:27:46 - HelloMapView]HOME is up on device 'emulator-5554'
[2010-01-15 12:27:46 - HelloMapView]Uploading HelloMapView.apk onto device 'emulator-5554'
[2010-01-15 12:27:46 - HelloMapView]Installing HelloMapView.apk...
The emulator comes up and I see my droid phone ready to load the HelloMapView app..but then it dies with the following:
[2010-01-15 12:27:51 - HelloMapView]Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2010-01-15 12:27:51 - HelloMapView]Please check logcat output for more details.
[2010-01-15 12:27:52 - HelloMapView]Launch canceled!
我從來沒有做過任何Android式發展和我來自一個C#背景,使我的Java是前途未卜......但沒有人看到任何我可能會失蹤?
該系統被稱爲* Android *。 * Droid *是摩托羅拉手機。 – 2010-01-15 17:38:49
對,但我的手機機器人正在運行系統android ...我在哪裏出錯了? – JonH 2010-01-15 17:42:07
我的意思是標籤:使用'android'而不是'droid'。 – 2010-01-15 17:50:50