Alex Rivera | Logout

Make Ctrl+F11 launch Android project even when on XML file

Asked 2011-05-05T15:22:07.813
36

Ctrl+F11 on Eclipse is a life saver. Unfortunately, it only works when the currently selected file tab is of a .java file. It doesn't work when the currently selected file tab is of an .xml file.

I searched this great SO resource and found something very similar to what I am looking for but unfortunately the solution offered simply doesn't work for XML in an Android project.

Is there a way to make Ctrl+F11 launch Android project even when on XML file?

This is my current preferences dialog windows:

enter image description here

Update: This mysteriously started working. I have no idea how this happened (I didn't change anything in the Eclipse, except for existing Eclipse and restarting it).

Edit
Report

2 Answers

8

Answering myself (after about 4 months): There isn't a way to make Ctrl+F11 launch Android project even when on XML file.

A currently working workaround is to select a .java file (Ctrl+F6), then run the project's exec via Ctrl+F11.

Alternatively, if you need to see the LogCat while the program is running, inject a Ctrl+F8 in between, i.e.:

  1. Select a .java file (Ctrl+F6),
  2. Switch to DDMS perspective (Ctrl+F8)
  3. Run the project's exec via Ctrl+F11.

Anything to avoid lifting hand from the keyboard... ;)

answered 2011-09-06T14:05:16.387
2

An alternative shortcut: Alt + Shift + A, which pops up an Android specific menu. Then press R or select Run with the mouse.

answered 2013-07-17T07:32:28.647

Your Answer