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

升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误


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

eclipse运行错误提示 Failed to load D:\Android\sdk\build-tools\26.0.0-preview\lib\dx.jar_第1张图片

控制台是这样输出的:

[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运行就成功了,哈哈,我太聪明了

eclipse运行错误提示 Failed to load D:\Android\sdk\build-tools\26.0.0-preview\lib\dx.jar_第2张图片

删了后的目录图:

eclipse运行错误提示 Failed to load D:\Android\sdk\build-tools\26.0.0-preview\lib\dx.jar_第3张图片

你可能感兴趣的:(android,异常处理)