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.
I am trying to open an unzipped Android Project using Eclipse but every time I try to run or debug it show this error: «selection cannot be launched and there are no recent launches».
So I looked it up and tried creating a new project from an existing source but opens with errors and I open the src etc folders. I also tried importing the project which didn’t work either. There are no run as options and changing the run configuration didn’t really help. I couldn’t find any option to open it as an Android project.
Could you please help me to run this project.
(Since I unzipped this project there is a _MACOSX folder when I import and I am not sure if that matters or should I remove that folder.)
asked Feb 11, 2012 at 12:49
I am running Eclipse Juno SR 2
I had a similar problem. To fix the issue go to Run-> Run Configurations…
- If there isn’t create a new run configuration (top left)
- Under Android tab: browse and select the project you want to run
- Under Target tab: select Always prompt to pick device (or) you can pick automatic launch.
Similar solution can be applied to the Debug by going to Run-> Debug Configurations…
Update:
I realize this is beyond the scope of the question but if any new developers are coming to answer then I would suggest switching to Android Studio from Eclipse. AS is the official Google supported IDE for Android development and much nicer to use.
answered May 10, 2013 at 7:54
![]()
toidiutoidiu
9352 gold badges12 silver badges25 bronze badges
3
In the Package Explorer (the left column), right-click on the name of the project (the top item). In the menu that appears, select «Run as»; then choose «Android Application».
answered May 6, 2014 at 7:05
I fixed it for Version: Luna SR2 (4.4.2)
- select run configurations from right side dropdown of run button.
- double click on android application.
- get changing window, select your project name by browsing button of «android» tap(there are 3 tabs).
- from «target» tab select ADT or your device, in which you want to run.
- then press «run» at right -bottom button, left-side of «cancel».
- after few moment, you will get new windows. from there you can select your connected device or ADT.
answered Oct 27, 2015 at 14:55
reza.cse08reza.cse08
5,83247 silver badges39 bronze badges
Generally this error comes in eclipse IDE when you don’t have a main() function in your code.
Check whether your program has public static void main(String [] args) in it or not.
answered Sep 4, 2015 at 19:42
I’m using a mac and this answer is for Kotlin inside Eclipse
I installed Kotlin from Eclipse MarketPlace, clicked the perspective tab
, opened Kotlin, created a new Kotlin project named FirstProject and then clicked src and created a Kotlin file named FirstFile (it had the .kt extension) and typed in
func main(args : Array<String>) {
println("Helooooooo")
}
I pressed the green Run button
but kept getting this screen.

To fix it, follow these steps:
- Right next to that green run button is a drop down arrow, press it then choose
Run Configurations

- On the left side of the accompanying screen click
Kotlin Script Launch Configurationand in the drop down clickNew_configurationthen selectRun

- After the screen disappeared when I pressed the Run button again I got the same exact «This selection cannot be launched …» screen. I deleted the project
FirstProjectand created another oneSecondProject> src > Kotlin file > named itSecondFile, typed in theprintln("Heloooooooo")code and a screen popped up

- I choose
OKand the project ran fine.
For steps 1 & 2 I also did the same thing and choose Gradle (you can see it the picture) but I don’t think that made any difference.
answered May 22, 2019 at 17:27
Lance SamariaLance Samaria
16.2k13 gold badges96 silver badges235 bronze badges
I am trying to open an unzipped Android Project using Eclipse but every time I try to run or debug it show this error: «selection cannot be launched and there are no recent launches».
So I looked it up and tried creating a new project from an existing source but opens with errors and I open the src etc folders. I also tried importing the project which didn’t work either. There are no run as options and changing the run configuration didn’t really help. I couldn’t find any option to open it as an Android project.
Could you please help me to run this project.
(Since I unzipped this project there is a _MACOSX folder when I import and I am not sure if that matters or should I remove that folder.)
asked Feb 11, 2012 at 12:49
I am running Eclipse Juno SR 2
I had a similar problem. To fix the issue go to Run-> Run Configurations…
- If there isn’t create a new run configuration (top left)
- Under Android tab: browse and select the project you want to run
- Under Target tab: select Always prompt to pick device (or) you can pick automatic launch.
Similar solution can be applied to the Debug by going to Run-> Debug Configurations…
Update:
I realize this is beyond the scope of the question but if any new developers are coming to answer then I would suggest switching to Android Studio from Eclipse. AS is the official Google supported IDE for Android development and much nicer to use.
answered May 10, 2013 at 7:54
![]()
toidiutoidiu
9352 gold badges12 silver badges25 bronze badges
3
In the Package Explorer (the left column), right-click on the name of the project (the top item). In the menu that appears, select «Run as»; then choose «Android Application».
answered May 6, 2014 at 7:05
I fixed it for Version: Luna SR2 (4.4.2)
- select run configurations from right side dropdown of run button.
- double click on android application.
- get changing window, select your project name by browsing button of «android» tap(there are 3 tabs).
- from «target» tab select ADT or your device, in which you want to run.
- then press «run» at right -bottom button, left-side of «cancel».
- after few moment, you will get new windows. from there you can select your connected device or ADT.
answered Oct 27, 2015 at 14:55
reza.cse08reza.cse08
5,83247 silver badges39 bronze badges
Generally this error comes in eclipse IDE when you don’t have a main() function in your code.
Check whether your program has public static void main(String [] args) in it or not.
answered Sep 4, 2015 at 19:42
I’m using a mac and this answer is for Kotlin inside Eclipse
I installed Kotlin from Eclipse MarketPlace, clicked the perspective tab
, opened Kotlin, created a new Kotlin project named FirstProject and then clicked src and created a Kotlin file named FirstFile (it had the .kt extension) and typed in
func main(args : Array<String>) {
println("Helooooooo")
}
I pressed the green Run button
but kept getting this screen.

To fix it, follow these steps:
- Right next to that green run button is a drop down arrow, press it then choose
Run Configurations

- On the left side of the accompanying screen click
Kotlin Script Launch Configurationand in the drop down clickNew_configurationthen selectRun

- After the screen disappeared when I pressed the Run button again I got the same exact «This selection cannot be launched …» screen. I deleted the project
FirstProjectand created another oneSecondProject> src > Kotlin file > named itSecondFile, typed in theprintln("Heloooooooo")code and a screen popped up

- I choose
OKand the project ran fine.
For steps 1 & 2 I also did the same thing and choose Gradle (you can see it the picture) but I don’t think that made any difference.
answered May 22, 2019 at 17:27
Lance SamariaLance Samaria
16.2k13 gold badges96 silver badges235 bronze badges
This tutorial demonstrates the Eclipse error The selection cannot be launched, and there are no recent launches in Java.
Eclipse The selection cannot be launched Error
When using Eclipse, an error The selection cannot be launched can occur. While we have a selection of classes and no class has the main method, this error will occur in Eclipse because Eclipse will only run the set of classes or an application when it finds the main class.
Eclipse needs to see the main method in one of the project files. Otherwise, it cannot run the application.
The main method should be properly defined as below.
public static void main(String[] args)
Without a proper definition of the main method, Eclipse will throw the The selection cannot be launched. Here is an example.
package delftstack;
public class Example {
public static void main(String[] args[]) throws IOException {
System.out.println("This is Delftstack.com");
}
}
The code above will throw The selection cannot be launched because the main method is not properly defined. Here is the correct version of the code.
package delftstack;
public class Example {
public static void main(String[] args) throws IOException {
System.out.println("This is Delftstack.com");
}
}
The [] is given to the String keyword in the main method statement. Now, this code will work properly.
See output:
Добрый вечер. Находил кучу подобных тем, но не касается моих проблем. Установил Java, AndroidSDK Eclipse и Android инструменты к нему. Первая ошибка была следующей the selection cannot be launched and there are no recent launches. После поиска решил выполнить как посоветовали
Вам нужно настроить конфигурацию запуска (главный класс, параметры и т. д.) нажав на Run -> Open Run Dialog или Run -> Run configuration
И в итоге добился другой ошибки
‘Launching New_configuration’ has encountered a problem.
An internal error occurred during:»Launching New_configuration»
Переустановил Eclipse, т.к. считаю, что наиболее оптимальной точкой, с которой можно правильно настроить Eclipse, это первая ошибка «the selection…». Итак, все по порядку.
Запускаю Eclipse. Жму File>New>Other>Android>Android Application Project>Next 4раза, ничего не трогая(кроме имени проекта)>Finish.
Передо мой визуальное представление приложения. Жму Run>Run и вижу
the selection cannot be launched and there are no recent launches
И нигде в отечественных статьях это не упоминается. Жду ответов, и одновременно изучаю android.com
Кстати, если я установлю это на Linux системы не решится вопрос? Хотя с чего бы…
Заранее благодарю.
__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь
Я только что начал программирование на Android, поэтому загрузил Eclipse и начал работу.
Создал мой первый проект после учебника отсюда: http://developer.android.com/training/basics/firstapp/creating-project.html#CommandLine
И когда я был на следующем уроке для запуска этого приложения отсюда: http://developer.android.com/training/basics/firstapp/running-app.html
Я сделал, как они сказали. Подключено мое устройство через USB, включена также отладка USB, но когда я нажал кнопку «Запуск на eclipse», вы получили указанную выше ошибку.

Что я сделал неправильно?
Ответ 1
Eclipse не может решить, что вы хотите запустить, и поскольку вы ничего не запускали раньше, он не может попробовать повторить запуск этого.
Вместо того, чтобы щелкнуть зеленую кнопку «запустить», щелкните раскрывающийся список рядом с ним и выберите «Запустить конфигурации». На вкладке Android убедитесь, что он установлен в вашем проекте. На вкладке «Цель» установите галочку и параметры, соответствующие целевому устройству. Затем нажмите «Выполнить». Следите за вкладкой «Консоль» в Eclipse — это позволит вам узнать, что происходит. После того, как вы установили свой набор настроек запуска, вы можете просто нажать зеленую кнопку «запустить» в следующий раз.
Иногда получить все, чтобы поговорить с вашим устройством, может быть проблематичным для начала. Рассмотрите возможность использования AVD (т.е. Эмулятора) в качестве альтернативы, по крайней мере, для начала, если у вас есть проблемы. Вы можете легко создать его в меню Window → Android Virtual Device Manager в Eclipse.
Чтобы просмотреть ход выполнения вашего проекта, который был установлен и запущен на вашем устройстве, проверьте консоль.
Это панель внутри Eclipse с вкладками «Проблемы/Javadoc/Декларация/Консоль/LogCat» и т.д. Она может быть сведена к минимуму — проверьте лоток в правом нижнем углу. Или просто используйте Window/Show View/Console в меню, чтобы оно стало на первый план. Есть две консоли, Android и DDMS — есть выпадающий список, где вы можете переключаться.
Ответ 2
Выполните следующие действия, чтобы запустить приложение на подключенном устройстве.
1. Измените каталоги в корневой части вашего Android-проекта и выполните:
ant debug
2. Убедитесь, что каталог Android SDK platform-tools/ включен в переменную среды PATH, затем выполните: adb install bin/<*your app name*>-debug.apk
На вашем устройстве найдите <*your app name*> и откройте его.
Обратитесь Запуск приложения