开发者

Android emulator does not start in eclipse

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.flyingmonk开发者_StackOverflowey.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


Go to Window -> Android SDK and AVD Manager -> Virtual Device and create a New Virtual Device there (Remember to specify the correct target API level for that device). If that virtual device is an accepted virtual device, the app will fire off that device when you run the app.


i was facing the sAMe issue go ro run the select run configuration browse your project select android a new configuration open then select run..

it was working for me..


sorry for above answer i just do it as like this.. open cmd promt.. go to that directory in which my sdk was extraxted i go to tool subdriectory then run android.bat file by just simply put the name android.bat in that file..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜