37

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?

1 Answer 1

82

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.

7
  • 4
    Good answer...you beat me to it! :) But I don't necessarily agree with "revert" the process to open another project. If its the first time running it, you will need to right-click the project and select run but after that it should be under "Run" at the top. So if you want to run a previously ran project you can select it from there. Then it will keep running that one until you select another. Hope that made sense, it did in my head but I'm really tired :P
    – codeMagic
    Mar 11, 2013 at 13:08
  • @codeMagic Yes, right-clicking on the project and select Run as Android project may also help in not to revert this process and will make the new application as 'the last launched app'. Thanks for the input :)
    – waqaslam
    Mar 11, 2013 at 13:13
  • Great answer! Saves a lot of clicks! It's even more useful than running currently selected file, because my app consists of multiple library projects. I want to run the app, not the library project I'm currently editing. Mar 12, 2013 at 9:12
  • 3
    You are, at this minute, my favorite human ever. This has bugged me for longer than I care to admit. Apr 25, 2013 at 18:13
  • Surprisingly, as of April 2014, this hasnt been fixed. Go Eclipse!
    – katzenhut
    Apr 8, 2014 at 13:10

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.