我刚刚下载了 Eclipse Galileo 并安装了 ADT10,并尝试使用本指南创建 phonegap 应用程序:http://www.phonegap.com/start但是每次我尝试构建时都会收到此错误:未知错误:无法构建:未从 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!
我知道这个论坛中已经有一些关于它的问题/答案,但它们对我没有用.
I know that there are already some questions/answers about it in this forum but they didnt work for me.
这是由于升级到最新版本不完整/混乱导致 {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*
并将其复制到:
{Android SDK 目录}platform-toolslib
重启eclipse,clean你的项目,一切都应该按预期工作了.
Restart eclipse, clean your project and everything should work as expected.
(如果 platform-toolslib 目录完全丢失,您将不得不使用 SDK 管理器重新安装Android SDK platform-tools".重新安装后 dx.jar 应该在其中,因此不会复制需要)
(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,则必须启动 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.
例如,在我的机器上,最新的是 {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).
我真的希望这对某人有用,因为我已经浪费了半天的时间来调查和寻找这样一个微不足道的错误的解决方案...... :-(
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... :-(
这篇关于Android ADT 错误,未从 SDK 文件夹加载 dx.jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
为什么在 Eclipse 的 SDK 中选择 Android API 而不是 Why would you choose Android API over Google APIs in the SDK on Eclipse?(为什么在 Eclipse 的 SDK 中选择 Android API 而不是 Google API?)
Couchbase 存储桶身份验证错误Couchbase Bucket authentication error(Couchbase 存储桶身份验证错误)
admob 6.2.1 空指针异常admob 6.2.1 nullpointer exception(admob 6.2.1 空指针异常)
如何在 IntelliJ IDEA 中设置 SDK?How to setup SDK in IntelliJ IDEA?(如何在 IntelliJ IDEA 中设置 SDK?)
eclipse 无法检测到我的手机进行试运行My phone cannot be detected in eclipse to test run(eclipse 无法检测到我的手机进行试运行)
android SDK 中缺少 platform-toolsaapt.exe 目录platform-toolsaapt.exe directory missing in android SDK(android SDK 中缺少 platform-toolsaapt.exe 目录)