首页 > 代码库 > Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

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 SDK folder!

这个报错是由于安卓的SDK版本太高导致的。两个解决方法,一个是直接使用Android studio,一个是删除高版本的构建包。

先看看报错情况:

技术分享

 

如图提示,加载失败26.0.1,那么我们需要打开SDK管理器,并删除这几个包

技术分享

删除后,重启Eclipse并Clean项目即可。

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