Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Run button doesn't work when Android xml file is selected

I have Eclipse Juno SR1 and Android SDK Tools 21.1, SDK Platform-tools 16.0.2 (latest) on Mac.

When I have some XML file selected and hit Run button, nothing happens. I have to select some Java File or project in the Package Explorer. Then it runs. It's quite annoying when I edit XML files. It was working in previous releases of Android SDK Tools.

Anyone knows any solution or workaround?

like image 428
David Vávra Avatar asked Mar 11 '13 12:03

David Vávra


People also ask

Can we run XML in Eclipse?

xml file, right-click on it, and select Run As option and then go to TestNG suite option. 3. The eclipse will execute XML file as TestNG suite.

How add XML file in eclipse?

Once you have downloaded WST and prerequisites, unzip them to the same folder and you are ready to go! Next, launch Eclipse workbench and select File>New>Examples>XML>Editing and validating XML files to bring up the wizard to create a simple project with the sample XML files.


1 Answers

I think its due to some recent changes in ADT 21.1.0. Anyhow, to resolve this, you may configure the following in Eclipse:

Window -> Preferences -> Run/Debug -> Launching -> (under Launch Operations) Always launch the previously launched application

In case you want to open another project, then you need to revert this process as it will always launch the previously launched application.

Also, keep in mind that this issue may be fixed in the future versions of ADT, so don't rely hard on this solution.

like image 145
waqaslam Avatar answered Oct 01 '22 04:10

waqaslam