eclipse中没有启动Android模拟器 [英] Android emulator does not start in eclipse

查看:172
本文介绍了eclipse中没有启动Android模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了整个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 {
/ **当活动首次创建时调用。 * /
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText(Hello,Android);
setContentView(tv);
}
}

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

  [2010-08-26 14:03:18  -  HelloAndroid] --- --------------------------- 
[2010-08-26 14:03:18 - HelloAndroid] Android发布!
[2010-08-26 14:03:18 - HelloAndroid] adb正常运行。
[2010-08-26 14:03:18 - HelloAndroid]执行com.nfshost.flyingmonkey.android.HelloAndroid活动启动
[2010-08-26 14:03:18 - HelloAndroid]自动目标上传HelloAndroid.apk到设备'015D7D330A028012'
[2010-08-26 14:03:18] HelloAndroid]安装HelloAndroid.apk ...
[2010-08-26 14:03:20 - HelloAndroid]成功!
[2010-08-26 14:03:20 - HelloAndroid]启动活动com.nfshost.flyingmonkey.android.HelloAndroid在设备上
[2010-08-26 14:03:21 - HelloAndroid] ActivityManager :开始:Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER] cmp = com.nfshost.flyingmonkey.android / .HelloAndroid}
/ pre>

只有模拟器从未出现在我的屏幕上,就像指南所说的那样( http://developer.android.com/guide/tutorials/hello-world.html#run

解决方案

查看我的问题的第一条评论:



自动目标模式:使用设备'015D7D330A028012'似乎建议安装在USB连接的设备上,而不是启动一个模拟器。 - Christopher Aug 26 at 19:17


I just installed the whole shebang in order to develop android apps in Eclipse (I'm running 64-bit gentoo). Everything seems to go fine, and I created the dev group's hello-world example:

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);
    }
}

I go to try and run it in eclipse, and according to the console it seems to work:

[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 }

Only, the emulator never shows up on my screen like the guide says it will (http://developer.android.com/guide/tutorials/hello-world.html#run)

解决方案

See first comment to my question:

Automatic Target Mode: using device '015D7D330A028012' seems to suggest it's installing onto a USB-attached device, rather than firing up an emulator. – Christopher Aug 26 at 19:17

这篇关于eclipse中没有启动Android模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆