Android 模拟器无法在 Eclipse 中启动

2024-04-17

我刚刚安装了整个 shebang,以便在 Eclipse 中开发 Android 应用程序(我运行的是 64 位 gentoo)。一切似乎都很顺利,我创建了开发组的 hello-world 示例:

package com.nfshost.flyingmonkey.android;

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);
        setContentView(R.layout.main);
        TextView tv = new TextView(this);
        tv.setText("Hello, Android");
        setContentView(tv);
    }
}

我去尝试在 eclipse 中运行它,根据控制台,它似乎可以工作:

[2010-08-26 14:03:18 - HelloAndroid] ------------------------------
[2010-08-26 14:03:18 - HelloAndroid] Android Launch!
[2010-08-26 14:03:18 - HelloAndroid] adb is running normally.
[2010-08-26 14:03:18 - HelloAndroid] Performing com.nfshost.flyingmonkey.android.HelloAndroid activity launch
[2010-08-26 14:03:18 - HelloAndroid] Automatic Target Mode: using device '015D7D330A028012'
[2010-08-26 14:03:18 - HelloAndroid] Uploading HelloAndroid.apk onto device '015D7D330A028012'
[2010-08-26 14:03:18 - HelloAndroid] Installing HelloAndroid.apk...
[2010-08-26 14:03:20 - HelloAndroid] Success!
[2010-08-26 14:03:20 - HelloAndroid] Starting activity com.nfshost.flyingmonkey.android.HelloAndroid on device 
[2010-08-26 14:03:21 - HelloAndroid] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.nfshost.flyingmonkey.android/.HelloAndroid }

只是,模拟器永远不会像指南所说的那样显示在我的屏幕上(http://developer.android.com/guide/tutorials/hello-world.html#run http://developer.android.com/guide/tutorials/hello-world.html#run)


请参阅对我的问题的第一条评论:

Automatic Target Mode: using device '015D7D330A028012' seems to suggest it's installing onto a USB-attached device, rather than firing up an emulator.– 克里斯托弗 8 月 26 日 19:17

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android 模拟器无法在 Eclipse 中启动 的相关文章

随机推荐