eclipse 缺少“运行方式”Android 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7713210/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Run as" android application is missing
提问by Terix
SDK and ADT are installed and working, but when I run some android code, the "Run As" panel is empty. I need to go to Run configuration, click on Android application, make a copy, put the name of my project on the copy and the run it. Then it run properly on the emulator. How can I add the "android application" item menu inside the run as menu?
SDK 和 ADT 已安装并正常工作,但是当我运行一些 android 代码时,“运行方式”面板是空的。我需要转到运行配置,单击 Android 应用程序,制作一个副本,将我的项目名称放在副本上并运行它。然后它在模拟器上正常运行。如何在 run as 菜单中添加“android application”项目菜单?
采纳答案by Pavel
You could Right Mouse Button Click(on activity class) > Run As
> Run Configurations
. Next is Right Mouse Button Clickon Android Application
> New
. Now you should add your virtual emulator in Target
. It works in my version of IDE.
你可以Right Mouse Button Click(在活动课上)> Run As
> Run Configurations
。接下来是Right Mouse Button Click关于Android Application
> New
。现在您应该在Target
. 它适用于我的 IDE 版本。
Now you can use this run configurations with your own settings.
现在您可以使用此运行配置和您自己的设置。
回答by hari_sree
"Run as Android application" is available if u run the project (right click project name and u have that option) , and not a specific activity file ..
如果您运行项目(右键单击项目名称并且您有该选项),而不是特定的活动文件,则“作为 Android 应用程序运行”可用。
回答by Paul Brownsea
Maybe this is a bit late to be answering this, but I think my answer is better. The right click is all fine and well, but it is a bit more effort each time than my suggestion.
也许现在回答这个有点晚了,但我认为我的回答更好。右键单击一切正常,但每次都比我的建议更费力。
Right click on the toolbar and click "Customise Perspective..." On the toolbar structure that pops up find "Launch" (On mine it's the 5th item down - it might vary) Then you need to tick the "Run " box After you click "OK" it should be back in the toolbar and in the menu
右键单击工具栏,然后单击“自定义视角...”在弹出的工具栏结构上找到“启动”(在我这里是第 5 个向下的项目 - 它可能会有所不同)然后您需要勾选“运行”框之后单击“确定”它应该回到工具栏和菜单中
回答by COD3BOY
Just select Run > Run
in eclipse and select android application.The Eclipse plugin automatically creates a new run configuration for your project and then launches the Android Emulator.
只需Run > Run
在 Eclipse 中选择并选择 android 应用程序。Eclipse 插件会自动为您的项目创建一个新的运行配置,然后启动 Android 模拟器。