解决Eclipse报错显示Unable to build: the file dx.jar was not loaded from the SDK folder

由于最近通过SDK-Manager更新了build-tools,当要用到dx.jar这个包时,自动调用最新build-tools中dx.jar,但是运行android项目时Console却提示:

Failed to load C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.0-preview\lib\dx.jar

Unable to build: the file dx.jar was not loaded from the SDK folder

解决步骤:

(1)找到你Android的SDK安装目录sdk,进入build-tools文件夹

(2)发现还有很多其他版本的build-tools,而且版本都是顺序排列的,我们就选择倒数第三个(最新版上面那个文件夹),打开进入lib文件夹

(3)发现26.0.2\lib里面有dx.jar包,降25.0.0\lib\dx.jar复制粘贴到26.0.2\lib目录下,替换掉原来的dx.jar包

(4)完成,再次启动Android项目,问题解决!

猜你喜欢

转载自blog.csdn.net/SmileToLin/article/details/81217473