Ok Folks我决定尝试这个开发人员的事情,经过大约十几个教程后,最终得到了以下Hello World类型程序:
package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);}
}
很简单,所以我去编译它,我得到了这个
[2011-03-14 00:11:25 – HelloAndroid] Android Launch!
[2011-03-14 00:11:25 – HelloAndroid] adb is running normally.
[2011-03-14 00:11:25 – HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-03-14 00:11:25 – HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD ‘my_avd’
[2011-03-14 00:11:25 – HelloAndroid] Launching a new emulator with Virtual Device ‘my_avd’
[2011-03-14 00:11:30 – HelloAndroid] New emulator found: emulator-5554
[2011-03-14 00:11:30 – HelloAndroid] Waiting for HOME (‘android.process.acore’) to be launched…
或者,如果我已经启动了模拟器,我会得到它
[2011-03-14 08:23:09 – HelloAndroid] Android Launch!
[2011-03-14 08:23:09 – HelloAndroid] adb is running normally.
[2011-03-14 08:23:09 – HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-03-14 08:23:09 – HelloAndroid] Automatic Target Mode: using existing emulator ’emulator-5554′ running compatible AVD ‘my_avd’
[2011-03-14 08:23:09 – HelloAndroid] WARNING: Application does not specify an API level requirement!
[2011-03-14 08:23:09 – HelloAndroid] Device API version is 7 (Android 2.1-update1)
[2011-03-14 08:23:09 – HelloAndroid] Uploading HelloAndroid.apk onto device ’emulator-5554′
[2011-03-14 08:23:09 – HelloAndroid] Installing HelloAndroid.apk…
[2011-03-14 08:23:26 – HelloAndroid] Success!
[2011-03-14 08:23:27 – HelloAndroid] Starting activity com.example.helloandroid.HelloAndroid on device emulator-5554
然后每次只有这个空白屏幕出现模拟器,文本“android”就可以了.它坐在那里大约3分钟,直到它进入另一个空白的黑色屏幕与“android”除了它的动画.我环顾四周,似乎找不到任何有同样问题的人.它就像模拟器甚至不能识别我正在做的任何事情.这是空白虚无的很好的截图:
那么,任何想法我做错了什么?