文章类型: ANDROID
关键词: Failed,to,load,android-sdk-windows,build-tools,ib,dx.jar,eclipse运行错误,Your,project,contains,error,,Unable,to,build:,the,file,dx.jar
内容摘要: Failed to load E:\SDK\android-sdk-windows\build-tools\26.0.1\lib\dx.jar

Failed to load E:\SDK\android-sdk-windows\build-tools\26.0.1\lib\dx.jar

2017/12/7 10:52:10    来源:apple    阅读:

eclipse打开安卓项目时报错,找不到dx.jar:


[2017-09-02 17:15:59 - Dex Loader] Failed to load E:\SDK\android-sdk-windows\build-tools\26.0.1\lib\dx.jar[2017-09-02 17:15:59 - SRTP1] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

如图:

blob.png


原因:eclipse自动使用最高版本的SDK,ADT比SDK版本低导致。


解决方案: 

1.可直接删除高版本SDK(我是用这种方法解决错误的);

2.使用“ADT BUNDLE”;

3.使用android studio;


eclipse运行错误提示 Failed to load D:\Android\sdk\build-tools\26.0.0-preview\lib\dx.jar

前几天在ecplise上运行项目还好好,今天一运行就提示这个错误:Your project contains error(s), please fix them before running your application.(你的程序包含错误,请修改后再运行)。咋一看,以为代码哪里写错了,我是左改右改,上改下改......还是提示这个错误,心都碎了:

4444444444.png

控制台是这样输出的:


[2017-03-28 22:11:52 - Dex Loader] Failed to load D:\Android\sdk\build-tools\26.0.0\lib\dx.jar

[2017-03-28 22:11:52 - api19] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

[2017-03-28 22:12:11 - Dex Loader] Failed to load D:\Android\sdk\build-tools\26.0.0\lib\dx.jar

[2017-03-28 22:12:11 - api19] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!


提示dx.jar文件没加载到,按网上一些方法试了也不行,我就找到D:\Android\sdk\build-tools\这个目录,目录如下图,我想,既然他找不到26.0.0这个文件夹,那我就把它删了。我把26.0.0文件夹剪切放到别的位置备份,以免出错再恢复回来。再次打开eclipse运行就成功了。

5555555.png

删了后的目录图:

666666666.png


↑ 上一篇文章:发现了以元素 'd:skin' 开头的无效内容。此处不应含有子元素 关键词:android,error,发现了以元素,skin,开头.. 发布日期:2017/12/7 10:47:12
↓ 下一篇文章:VC中线程函数如何传递多个参数 关键词:VC,线程,函数,如何,传递,多个参数,CreateTh.. 发布日期:2017/12/13 13:20:34
相关文章:
eclipse Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder! 关键词:eclipse运行错误提示Unknown,error:,Unable,to,build:,the.. 发布日期:2017-09-21 17:22
VC++ fatal error C1083: Cannot open include file msado15.tli': No such file or directory 关键词:VC++,fatal,error,C1083,Cannot,open,include,file,.. 发布日期:2016-08-10 11:25
The connection to adb is down, and a severe error has occured. 关键词:The,connection,to,adb,is,down,,and,a,severe,erro.. 发布日期:2017-05-04 18:08
相关目录:.NETANDROID
我要评论
正在加载评论信息......