我是开发 Android 应用程序和开发 HelloWorld 应用程序的新手。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView text = new TextView(this);
text.setText("Hello World");
setContentView(text);
}
但是当我在 AVD 上运行我的应用程序时,我的控制台中会出现以下情况。
[2013-04-07 17:01:31 - Myapp] R.java was modified manually! Reverting to generated version!
[2013-04-07 17:01:48 - Myapp] ------------------------------
[2013-04-07 17:01:48 - Myapp] Android Launch!
[2013-04-07 17:01:48 - Myapp] adb is running normally.
[2013-04-07 17:01:50 - Myapp] Performing com.example.myapp.MainActivity activity launch
[2013-04-07 17:01:53 - Myapp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'dv'
[2013-04-07 17:01:53 - Myapp] Uploading Myapp.apk onto device 'emulator-5554'
[2013-04-07 17:01:54 - Myapp] Installing Myapp.apk...
[2013-04-07 17:02:05 - Myapp] Success!
[2013-04-07 17:02:05 - Myapp] Starting activity com.example.myapp.MainActivity on device emulator-5554
模拟器也启动。但它不打印 HelloWorld。
我怎样才能让我的应用程序运行?