问题背景

此问题一般出现在,同时使用了Eclipse和Android Studio,eclipse是不会去下载最新的Android的相关tools,但是studio有时候会自动更新最新的build-tools。这就导致了 你eclipse编译的时候使用的build-tools可能出现问题,今天我就遇到了,经过多次查找及实践,终于解决了,也对网上一些帖子进行了一些补充。
解决方法

其实解决方式非常简单,就是把SDK的其他版本的build-tools转移到最新的build-tools下。
第一步:找到你eclipse项目的build target版本如图(1):

我的是5.0的版本

第二步:进入你的SDK文件夹,选择相应的 build-tools版本,如图(2):

是25的就行了
第三步:拷贝dx.jar,我拷贝的\build-tools\25.0.0\lib\dx.jar

这里随便一个25开头的都可以,其他26,27的我这里测试不起作用。
第四步:进入图2 ,最下面的文件夹(也就是最新的build-target)里面去,路径:\build-tools\28.0.0-rc1\lib,把你上一步拷贝的dx.jar放进来

为了防止文件丢失,建议把最新的dx.jar备份一下,这样就可以了,亲测没毛病。

Android开发导出apk报错:Unable to build: the file dx.jar was not loaded from the SDK folder的更多相关文章

  1. eclipse升级Android SDK Tool版本到25.2.5后运行项目报错Unable to build: the file dx.jar was not loaded from the SDK folder

    概述 由于最近通过SDK-Manager更新了build-tools,当要用到dx.jar这个包时,自动调用最新版本Android SDK build-tools中dx.jar,但是运行android ...

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

    eclipse 运行 android 时失败了,提示 Unable to build: the file dx.jar was not loaded from the SDK folder! 解决办法 ...

  3. Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

    Eclipse 编译没问题,但是运行就出现这个报错:Unknown error: Unable to build: the file dx.jar was not loaded from the SD ...

  4. [转]Unable to build: the file dx.jar was not loaded from the SDK folder!

    本文转自:http://www.developerbits.com/tag/unable-to-build-the-file-dx-jar-was-not-loaded-from-the-sdk-fo ...

  5. 解决Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

    解决Unknown error: to the dx.jar the SDK folder!最近渐渐迁移到Android Studio来了,更新过Android SDK Manager里的东西后,打开 ...

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

    旧版的SDK管理器里面最高只能安装Android 3.2 API,需要更新SDK管理器版本后才能安装Android 4.0.Android 4.1,方法如下: http://blog.csdn.net ...

  7. Android N安装apk报错:android.os.FileUriExposedException

    StackOverflow: http://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-s ...

  8. Android开发--ListPreferance 运行报错:android.preference.ListPreference.findIndexOfValue(ListPreference.java:169)

    在Stack Overflow上找到的答案:http://stackoverflow.com/questions/4357094/exception-on-listpreferences “i fix ...

  9. weblogic 12c下jxls导出excel报错Could not initialize class org.apache.poi.xssf.usermodel.XSSFVMLDrawing

    周一,开发反馈weblogic 12c下jxls导出excel报错,公司环境和UAT环境均报错,看日志如下: 2016-06-08 09:16:55,825 ERROR org.jxls.util.T ...

随机推荐

  1. POJ 1258 Agri-Net 【Prime】模板题

    题目链接>>> 题目大意:     给你N*N矩阵,表示N个村庄之间的距离.FJ要把N个村庄全都连接起来,求连接的最短距离(即求最小生成树).解析如下: #include <c ...

  2. Django分页(一)

    Django分页(一) 手动实现简单分页 HTML <!DOCTYPE html> <html lang="en"> <head> <me ...

  3. log4j平稳升级到log4j2

    一.前言 公司中的项目虽然已经用了很多的新技术了,但是日志的底层框架还是log4j,个人还是不喜欢用这个的.最近项目再生产环境上由于log4j引起了一场血案,于是决定升级到log4j2. 二.现象 虽 ...

  4. hr相关的

    1.自我介绍? 2.为什么要离职?之前几家公司离职的原因分别是什么? 3.从上一家公司离职的原因? 4.目前就职的公司最大的收获是什么? 从上家公司到目前公司的最大收获是什么,要突出目标明确,在当前的 ...

  5. RFC2616-HTTP1.1-Methods(方法规定部分—译文)

    part of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al. 9 方法定义 下面列出了有关HTTP/1.1协议的一些 ...

  6. html 的实践

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. SpringBoot使用缓存

    前言 我们都知道,一个程序的瓶颈通常都在数据库,很多场景需要获取相同的数据.比如网站页面数据等,需要一次次的请求数据库,导致大部分时间都浪费在数据库查询和方法调用上,这时就可以利用到缓存来缓解这个问题 ...

  8. C# 执行CMD 命令

    /// <summary> /// 执行CMD 命令 /// </summary> /// <param name="strCommand">命 ...

  9. Scrapy基础(九)————将不定长度的URL进行固定长度写入Item中

    前面讲到将每篇文章的URL写入Item,但是每个url的长度是不同的,可以在Item中设置一个字段怎样使得每个URL的长度相同,这就需要对每个URL进行md5运算,使得长度统一,再加入到设定的Item ...

  10. npm install出错,npm ERR! code EINTEGRITY npm ERR! Verification failed while extracting url-parse@1.4.3

    npm install时出现以下错误: npm ERR! code EINTEGRITY npm ERR! Verification failed while extracting url-parse ...