Eclipse 错误,“无法启动选择,并且最近没有启动

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

问题描述

我刚开始 Android 编程,所以下载了 Eclipse 并开始使用.

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

从这里按照教程创建了我的第一个项目:http://developer.android.com/training/basics/firstapp/creating-project.html#CommandLine

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

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

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

我照他们说的做了.通过 USB 连接我的设备,也启用了 USB 调试,但是当我在 Eclipse 上单击运行时,出现上述错误.

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.

我做错了什么?

推荐答案

Eclipse 无法计算出您想要运行的内容,并且由于您之前没有运行过任何内容,因此它也无法尝试重新运行.

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.

不要单击绿色的运行"按钮,而是单击它旁边的下拉菜单并选择运行配置.在 Android 选项卡上,确保将其设置为您的项目.在目标"选项卡中,根据您的设备设置相应的复选框和选项.然后单击运行.密切注意 Eclipse 中的 Console 选项卡——它会让你知道发生了什么.设置好运行配置后,下次只需点击绿色的运行"按钮即可.

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.

有时,让所有内容都与您的设备通信可能会出现问题.考虑使用 AVD(即模拟器)作为替代方案,至少在遇到问题时开始.您可以从 Eclipse 中的菜单 Window -> Android Virtual Device Manager 轻松创建一个.

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.

要查看您的项目在您的设备上安装和启动的进度,请检查控制台.它是 Eclipse 中的一个面板,带有标签 Problems/Javadoc/Declaration/Console/LogCat 等.它可以被最小化 - 检查右下角的托盘.或者只是使用菜单中的 Window/Show View/Console 使其位于最前面.有两个控制台,Android 和 DDMS - 其图标旁边有一个下拉菜单,您可以在其中切换.

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 错误,“无法启动选择,并且最近没有启动"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:如何在 Android SDK 中编写向后兼容的新功能? 下一篇:IPackageStatsObserver 无法解析为类型(Android)

相关文章

最新文章