java - Android 模拟器没有响应程序

标签 java android eclipse android-emulator

好的,伙计们,我决定尝试这个开发人员的东西,在大约十二个教程之后,最终得到了以下 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”。我环顾四周,似乎找不到任何有同样问题的人。就像模拟器甚至无法识别我正在做的任何事情一样。这是空白虚无的漂亮屏幕截图:

enter image description here

那么,你知道我哪里做错了吗?

最佳答案

尝试等待模拟器加载所有内容,然后再启动您的应用。

关于java - Android 模拟器没有响应程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5299260/

相关文章:

java - 使用 sax 解析器实现的设计问题

java - 如何使用 Verlet 积分器避免因时间步长变化而产生的不需要的额外速度

android - Eclipse 不显示 Genymotion 模拟器列表

java - 将 JPanel 更改为 JFrame 上的另一个 JPanel。如何?

java - Eclipse Mac OS X 调试错误 : "FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)"

java - 自定义 Java 类的动态构造函数结构

java - 如何设置java时区?

android - AsyncStorage 不适用于 Android,在 iOS 中正常

android - 如何在android中一次对2个列表进行排序

java - 如何在 Eclipse 插件中定向组件?