Android模拟器无法在eclipse中启动

时间:2010-08-26 19:07:39

标签: android eclipse android-emulator

我刚刚安装了整个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

4 个答案:

答案 0 :(得分:3)

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

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

答案 1 :(得分:0)

转到窗口 - > Android SDK和AVD Manager - >虚拟设备并在那里创建一个新的虚拟设备(请记住为该设备指定正确的目标API级别)。如果该虚拟设备是可接受的虚拟设备,则应用程序将在您运行该应用程序时启动该设备。

答案 2 :(得分:0)

我正面临着sAMe问题去运行选择运行配置浏览你的项目选择android一个新配置打开然后选择运行..

这对我有用..

答案 3 :(得分:0)

对不起上面的回答我就像这样做.. 打开cmd promt .. 转到我的sdk被解除的目录我转到工具子目录然后运行android.bat文件只需将名称android.bat放在该文件中..