在 Eclipse 中添加应用程序启动快捷方式?

发布于 2024-09-13 10:57:38 字数 303 浏览 6 评论 0原文

我在 Eclipse 中进行 Android 编程已经大约一年了,我总是通过在项目资源管理器中右键单击我的项目名称,然后依次选择“运行方式”和“Android 应用程序”来启动我的应用程序。必须有更好的方法...

有没有办法改变这一点(点击三下鼠标):

“右键单击项目”-> “运行为”-> “Android 应用程序”

对此(按下一个热键):

<我最喜欢的热键>

那么我只需按一个按钮即可启动我的应用程序?

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

屋顶上的小猫咪 2024-09-20 10:57:38
  1. 日食/窗口>首选项>运行/调试>启动
  2. 在“启动操作”部分中选择“始终启动先前启动的应用程序”。
  3. 然后只需使用您选择的快捷方式即可。我认为 Ctrl + F11 是默认的
  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
忆悲凉 2024-09-20 10:57:38

在首选项中,转到常规 ->键并搜索 Android 应用程序命令。您可以从此处设置新的组合键。

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

无言温柔 2024-09-20 10:57:38

在 MacOSX 上,我使用的是 Cmd+Shift+F11,在笔记本电脑键盘上为 Cmd+< kbd>fn+Shift+F11

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

蓝梦月影 2024-09-20 10:57:38

我不确定为什么最后一个答案被否决,因为我认为这是最好的答案。在标准 ADT Eclipse 工具栏中,有以下按钮: 在此处输入图像描述

如果您正在编辑 Java 文件,并按下此按钮,您的应用程序将自动启动。因此,这是一键启动您的应用程序的方法。

与此处提到的其他快捷方式一样,如果您正在编辑 XML 文件,则此方法不起作用(因此请确保您的编辑器显示 Java 文件)。

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: enter image description here

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).

翻了热茶 2024-09-20 10:57:38

1) Eclipse/窗口 >首选项>运行/调试>启动

2) 在“启动操作”部分中选择“始终启动先前启动的应用程序”。

3)然后只需使用您选择的快捷方式即可。我认为 Ctrl + F11 是默认设置

有人建议上面的方法,它对我有用!

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!

夢归不見 2024-09-20 10:57:38

如果您想在 Eclipse 中打开 XML 文件时运行应用程序,则必须设置运行配置
日食->运行->运行配置->左侧窗口中的 Android 应用程序 ->您的配置->右侧窗口中的 android 选项卡 ->发射->选择您的主要活动

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

青衫负雪 2024-09-20 10:57:38

为此,您可以使用 (ctrl+F11) ,它显示用作模拟器的所有在线设备

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

韬韬不绝 2024-09-20 10:57:38

Eclipse 工具栏有绿色的运行按钮,其默认含义是运行最后选择的配置。只需点击那里即可。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文