Add application launch shortcut in Eclipse?

二次信任 提交于 2019-12-03 01:43:57

In preferences, go to General -> keys and search for the Android Application command. You can set a new key combination from here.

  1. Eclipse/Window > Preferences > Run/Debug > Launching
  2. Select 'Always launch the previously launched application' in the 'Launch Operation' section.
  3. Then just use your shortcut of choice. I think Ctrl + F11 is the default for this
Geert Weening

On MacOSX, for me worked Cmd+Shift+F11, which came down on laptop keyboard to Cmd+fn+Shift+F11

I am not sure why the last answer is voted down, as I think it is the best answer. In the standard ADT Eclipse tool bar, there is the following button:

If you are editing a Java file, and press this button, your app will automatically be launched. Thus, this is one the one button press to launch your app.

As with the other shortcuts mentioned here, this does not work if you are editing an XML file (so ensure your editor is showing a Java file).

1) Eclipse/Window > Preferences > Run/Debug > Launching

2) Select 'Always launch the previously launched application' in the 'Launch Operation' section.

3) Then just use your shortcut of choice. I think Ctrl + F11 is the default for this

Someone suggested the above and it worked for me!

If you want to run your app when a XML file is open in your eclipse you must set your run configuration Eclipse -> run -> run configuration -> Android Application in left window -> your configuration -> android tab in right window -> launch -> select your main activity

For this you can use (ctrl+F11) , which shows all online devices which is used as emulator

Eclipse toolbar has green run button which has default meaning run last selected configuration. Just click there.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!