問題描述
我剛剛下載了 Eclipse Galileo 并安裝了 ADT10,并嘗試使用本指南創(chuàng)建 phonegap 應(yīng)用程序:http://www.phonegap.com/start但是每次我嘗試構(gòu)建時(shí)都會(huì)收到此錯(cuò)誤:未知錯(cuò)誤:無法構(gòu)建:未從 SDK 文件夾加載文件 dx.jar!
I just downloaded Eclipse Galileo and installed ADT10 and tried to a phonegap app using this guide: http://www.phonegap.com/start But each time i try to build im getting this error: Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
我知道這個(gè)論壇中已經(jīng)有一些關(guān)于它的問題/答案,但它們對(duì)我沒有用.
I know that there are already some questions/answers about it in this forum but they didnt work for me.
推薦答案
這是由于升級(jí)到最新版本不完整/混亂導(dǎo)致 {Android SDK dir}platform-toolslib 中缺少 dx.jar
.
This is caused by incomplete/messy upgrade to latest version which results in dx.jar missing from {Android SDK dir}platform-toolslib
.
解決方案:
在 {Android SDK dir}platforms*
中找到您最新的 dx.jar
Find your latest dx.jar in {Android SDK dir}platforms*
并將其復(fù)制到:
{Android SDK 目錄}platform-toolslib
重啟eclipse,clean
你的項(xiàng)目,一切都應(yīng)該按預(yù)期工作了.
Restart eclipse, clean
your project and everything should work as expected.
(如果 platform-toolslib
目錄完全丟失,您將不得不使用 SDK 管理器重新安裝Android SDK platform-tools".重新安裝后 dx.jar 應(yīng)該在其中,因此不會(huì)復(fù)制需要)
(If platform-toolslib
directory is missing entirely you will have to reinstall "Android SDK platform-tools" using SDK manager. After reinstall dx.jar should be in there so no copying will be needed)
如果您在任何 {Android SDK dir}platforms*
子目錄中都找不到 dx.jar
,則必須啟動(dòng) SDK 管理器并安裝 Android 1.6SDK.
If you can't find dx.jar
in any of {Android SDK dir}platforms*
subdirs you will have to start SDK manager and install Android 1.6 SDK.
例如,在我的機(jī)器上,最新的是 {Android SDK dir}platformsandroid-4 oolslib
.(截至 2012-01-22 Android SDK R15,我沒有找到任何更新的版本.
For example on my machine latest was in {Android SDK dir}platformsandroid-4 oolslib
.
(I did not find any newer version as of 2012-01-22 Android SDK R15).
我真的希望這對(duì)某人有用,因?yàn)槲乙呀?jīng)浪費(fèi)了半天的時(shí)間來調(diào)查和尋找這樣一個(gè)微不足道的錯(cuò)誤的解決方案...... :-(
I really hope that this is useful for someone because I've wasted half a day investigating and looking for solution of such a trivial bug... :-(
這篇關(guān)于Android ADT 錯(cuò)誤,未從 SDK 文件夾加載 dx.jar的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!