[Solved] Eclipse error, “The selection cannot be launched, and there are no recent launches” [duplicate]

I have just started Android programming so downloaded Eclipse and got started.

Created my first project following tutorial from here:

And when I was on next lesson to run that application from here:

I did as they said. Connected my device via USB, enabled USB debugging too, but when I clicked Run on eclipse, got the above error.

enter image description here

What have I done wrong?

Solution #1:

Eclipse can’t work out what you want to run and since you’ve not run anything before, it can’t try re-running that either.

Instead of clicking the green ‘run’ button, click the dropdown next to it and chose Run Configurations. On the Android tab, make sure it’s set to your project. In the Target tab, set the tick box and options as appropriate to target your device. Then click Run. Keep an eye on your Console tab in Eclipse – that’ll let you know what’s going on. Once you’ve got your run configuration set, you can just hit the green ‘run’ button next time.

Sometimes getting everything to talk to your device can be problematic to begin with. Consider using an AVD (i.e. an emulator) as alternative, at least to begin with if you have problems. You can easily create one from the menu Window -> Android Virtual Device Manager within Eclipse.

To view the progress of your project being installed and started on your device, check the console.
It’s a panel within Eclipse with the tabs Problems/Javadoc/Declaration/Console/LogCat etc. It may be minimised – check the tray in the bottom right. Or just use Window/Show View/Console from the menu to make it come to the front. There are two consoles, Android and DDMS – there is a dropdown by its icon where you can switch.

Respondent: NigelK

Solution #2:

Follow these steps to run your application on the device connected.
1. Change directories to the root of your Android project and execute:
ant debug
2. Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable, then execute: adb install bin/<*your app name*>-debug.apk
On your device, locate <*your app name*> and open it.

Refer Running App

Respondent: VikramV

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy