Eclipse错误,“选择不能启动,并且最近没有启动” [英] Eclipse error, "The selection cannot be launched, and there are no recent launches"

查看:1820
本文介绍了Eclipse错误,“选择不能启动,并且最近没有启动”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚启动了Android编程,所以下载了Eclipse并开始了。



从这里创建了我的第一个项目,如下所示: http://developer.android.com/training/basics/firstapp/creating-project.html#CommandLine



当我在下一课中从这里运行该应用程序时: http://developer.android.com/training/basics/firstapp/running-app.html


$ b $我按照他们说的那样做。通过USB连接我的设备,启用USB调试,但是当我单击在eclipse上运行时,得到以上错误。





我做错了什么?

解决方案

Eclipse无法解决您想要的运行,因为你以前没有运行任何东西,它不能尝试重新运行。



而不是点击绿色的运行按钮,点击下拉菜单旁边选择运行配置。在Android选项卡上,确保它已设置为您的项目。在目标选项卡中,根据需要设置勾选框和选项以定位设备。然后单击运行。注意Eclipse中的控制台选项卡 - 这将让您知道发生了什么。一旦你设置了你的运行配置,你可以在下一次点击绿色的运行按钮。



有时让所有的东西与你的设备通话可能是有问题的首先。考虑使用AVD(即仿真器)作为替代方案,至少从您的问题开始。您可以从Eclipse中的窗口 - >Android虚拟设备管理器菜单中轻松创建一个。



要查看您的设备正在安装和启动的项目进度,请检查安慰。
它是Eclipse中的一个面板,具有选项卡问题/ Javadoc /声明/控制台/ LogCat等。它可能被最小化 - 检查右下方的托盘。或者只需从菜单中使用窗口/显示视图/控制台即可。有两个控制台,Android和DDMS - 它的图标有一个下拉菜单,您可以在其中切换。


I have just started Android programming so downloaded Eclipse and got started.

Created my first project following tutorial from here: http://developer.android.com/training/basics/firstapp/creating-project.html#CommandLine

And when I was on next lesson to run that application from here: http://developer.android.com/training/basics/firstapp/running-app.html

I did as they said. Connected my device via USB, enabled USB debugging too, but when I clicked Run on eclipse, got the above error.

What have I done wrong?

解决方案

Eclipse can't work out what you want to run and since you've not run anything before, it can't try re-running that either.

Instead of clicking the green 'run' button, click the dropdown next to it and chose Run Configurations. On the Android tab, make sure it's set to your project. In the Target tab, set the tick box and options as appropriate to target your device. Then click Run. Keep an eye on your Console tab in Eclipse - that'll let you know what's going on. Once you've got your run configuration set, you can just hit the green 'run' button next time.

Sometimes getting everything to talk to your device can be problematic to begin with. Consider using an AVD (i.e. an emulator) as alternative, at least to begin with if you have problems. You can easily create one from the menu Window -> Android Virtual Device Manager within Eclipse.

To view the progress of your project being installed and started on your device, check the console. It's a panel within Eclipse with the tabs Problems/Javadoc/Declaration/Console/LogCat etc. It may be minimised - check the tray in the bottom right. Or just use Window/Show View/Console from the menu to make it come to the front. There are two consoles, Android and DDMS - there is a dropdown by its icon where you can switch.

这篇关于Eclipse错误,“选择不能启动,并且最近没有启动”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆