Guimo
Guimo

Reputation: 732

Can't start HelloWorld sample program

I'm trying to run a Hello World sample app in Eclipse with a Virtual Device (recently started learning Android) and the first problem I encounter is that when I try to run the app, I get this error in a pop-up window:

"Couldn't launch the emulator! Make sure the SDK directory is properly setup and the emulator is not missing."

To run it, I right click the project folder and "Run as... -> Android Application".

The emulator itself works fine when running from Android Virtual Device Manager, and I think the SDK directory is fine. This is my current path: "C:\adt-bundle-windows-x86_64-20140321\sdk", and in the "Windows -> Preferences" window I get a list, containing in the Target Name column:

Target Name

-Android 4.4.2

-Google APIs

-Google APIs (x86 System Image)

I don't know if that is what it's meant to be shown there.

Thank you for your time.


EDIT: I add some screenshots:

This is the error I get, plus some console info about what is going on: https://i.sstatic.net/5kJTr.png

Current run configuration: https://i.sstatic.net/tMLk4.png

SDK location: https://i.sstatic.net/xFs7Z.png

LogCat output: https://i.sstatic.net/FasSl.png


EDIT2: I restarted Eclipse and now it seems to be working, I don't know why. The following appeared in the console now:

https://i.sstatic.net/fPRST.png

Looking for information about the HAX error, I found this post Running the new Intel emulator for Android

Problem seems to be solved.

Upvotes: 0

Views: 102

Answers (2)

Guimo
Guimo

Reputation: 732

Restarting Eclipse did the job, even though I don't know why.

Upvotes: 1

George Rappel
George Rappel

Reputation: 7206

Click the menu on the top "Run", then "Run Configurations".

https://i.sstatic.net/cB7vb.png

Double-click the "Android application" on the left menu. A new "android configuration" will apear. Click "Browse" on the right to select a project. Select the project you want. Now, click on the tab "Target".

Now, click on "Manager"(1), and then click on "New...". You will configure a new android device to run your application. (Take care about the RAM, make sure your computer has enough memory to run it)

Finish and he will apear on the virtual device tab. Close it and click "Refresh" right above manage, and your device will apear on the list. Select him by clicking on the checkbox.

Now, all you have to do is "Apply" your changes and click Run. This will run your project in the device you created. The app will open as soon as you unlock the virtual device. You can look the "LogCat" for possible errors on your app.

Good luck.


@EDIT

Did you download also the Tools on the SDK Manager? Go to your "SDK Folder > Tools" and see if you have emulator files with this black and green icon:

If you don't have, you have the download this tool on Eclipse: Window > Android SDK Manager, and select the tools to download.

Upvotes: 1

Related Questions