由于最近通过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文件夹

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

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

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

相关文章:

  • 2022-12-23
  • 2021-08-11
  • 2021-09-12
  • 2021-05-09
  • 2022-12-23
  • 2022-01-10
  • 2021-09-26
  • 2021-07-21
猜你喜欢
  • 2022-01-10
  • 2021-08-08
  • 2021-06-12
  • 2021-12-25
相关资源
相似解决方案