問(wèn)題描述
我剛開(kāi)始 Android 編程,所以下載了 Eclipse 并開(kāi)始使用.
I have just started Android programming so downloaded Eclipse and got started.
從這里按照教程創(chuàng)建了我的第一個(gè)項(xiàng)目: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
當(dāng)我在下一課從這里運(yùn)行該應(yīng)用程序時(shí):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
我照他們說(shuō)的做了.通過(guò) USB 連接我的設(shè)備,也啟用了 USB 調(diào)試,但是當(dāng)我在 Eclipse 上單擊運(yùn)行時(shí),出現(xiàn)上述錯(cuò)誤.
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.
我做錯(cuò)了什么?
推薦答案
Eclipse 無(wú)法計(jì)算出您想要運(yùn)行的內(nèi)容,并且由于您之前沒(méi)有運(yùn)行過(guò)任何內(nèi)容,因此它也無(wú)法嘗試重新運(yùn)行.
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.
不要單擊綠色的運(yùn)行"按鈕,而是單擊它旁邊的下拉菜單并選擇運(yùn)行配置.在 Android 選項(xiàng)卡上,確保將其設(shè)置為您的項(xiàng)目.在目標(biāo)"選項(xiàng)卡中,根據(jù)您的設(shè)備設(shè)置相應(yīng)的復(fù)選框和選項(xiàng).然后單擊運(yùn)行.密切注意 Eclipse 中的 Console 選項(xiàng)卡——它會(huì)讓你知道發(fā)生了什么.設(shè)置好運(yùn)行配置后,下次只需點(diǎn)擊綠色的運(yùn)行"按鈕即可.
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.
有時(shí),讓所有內(nèi)容都與您的設(shè)備通信可能會(huì)出現(xiàn)問(wèn)題.考慮使用 AVD(即模擬器)作為替代方案,至少在遇到問(wèn)題時(shí)開(kāi)始.您可以從 Eclipse 中的菜單 Window -> Android Virtual Device Manager 輕松創(chuàng)建一個(gè).
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.
要查看您的項(xiàng)目在您的設(shè)備上安裝和啟動(dòng)的進(jìn)度,請(qǐng)檢查控制臺(tái).它是 Eclipse 中的一個(gè)面板,帶有標(biāo)簽 Problems/Javadoc/Declaration/Console/LogCat 等.它可以被最小化 - 檢查右下角的托盤(pán).或者只是使用菜單中的 Window/Show View/Console 使其位于最前面.有兩個(gè)控制臺(tái),Android 和 DDMS - 其圖標(biāo)旁邊有一個(gè)下拉菜單,您可以在其中切換.
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.
這篇關(guān)于Eclipse 錯(cuò)誤,“無(wú)法啟動(dòng)選擇,并且最近沒(méi)有啟動(dòng)"的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!