Add application launch shortcut in Eclipse?

2019-03-14 16:35发布

I've been programming Android in Eclipse for about a year now and I have always launched my app by right clicking on my project name in the project explorer, followed by "run as", then "Android Application". There has to be a better way...

Is there a way to change this (three mouse clicks):

"Right click on project" -> "run as" -> "Android Application"

To this (one hotkey press):

<My favorite hotkey>

So I can just press one button to launch my app?

Thanks!

8条回答
虎瘦雄心在
2楼-- · 2019-03-14 16:37
  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
查看更多
别忘想泡老子
3楼-- · 2019-03-14 16:37

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!

查看更多
Emotional °昔
4楼-- · 2019-03-14 16:40

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

查看更多
乱世女痞
5楼-- · 2019-03-14 16:41

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

查看更多
beautiful°
6楼-- · 2019-03-14 16:47

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

查看更多
手持菜刀,她持情操
7楼-- · 2019-03-14 16:51

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

查看更多
登录 后发表回答