首页 Android 启动安卓程序提示:Unable to build: the file dx.jar was not loaded from the SDK folder

启动安卓程序提示:Unable to build: the file dx.jar was not loaded from the SDK folder

作者:胡同里的砖头 围观群众:269 更新于:2022-04-19

[2022-04-19 13:46:57 - Dex Loader] Failed to load Y:\Android\adt-bundle-windows-x86_64-20140321\sdk\build-tools\30.0.3\lib\dx.jar
[2022-04-19 13:46:57 - school_app] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
报错如下


原因: eclipse编译Android项目默认选择当前安装的最高版本build-tools,而当前最高27版本出现问题. 可以选择其他版本的build-tools。

打开Android SDK Manager:


可以看到当前安装了2个版本 build-tools,分别是30.0.3版本 19.0.3版本。

错误提示30.0.3版本出错,就改用其他版本。

[2022-04-19 13:46:57 - Dex Loader] Failed to load Y:\Android\adt-bundle-windows-x86_64-20140321\sdk\build-tools\30.0.3\lib\dx.jar
[2022-04-19 13:46:57 - school_app] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

打开Android项目下 project.properties 文件


添加:sdk.buildtools=19.0.3

改完保存文件,再点project-clean

再重启项目即可

  • 本文标题: 启动安卓程序提示:Unable to build: the file dx.jar was not loaded from the SDK folder
  • 文章分类:【Android】
  • 非特殊说明,本文版权归【胡同里的砖头】个人博客 所有,转载请注明出处.
留言评论
站点声明:
1、本站【胡同里的砖头】个人博客,借鉴网上一些博客模板,取其各优点模块自行拼装开发,本博客开发纯属个人爱好。
2、所有笔记提供给广大用户交流使用,可转载,可复制,纯个人开发所遇问题锦集记录使用
Copyright © huzlblog.com All Rights Reserved. 备案号:苏ICP备2021056683号-8