在运行Android时出现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!报错
最开始出现的时候,我到处查询如何解决这个问题。参考了很多解决办法,最后终于找到了。

刚开始按照网上的方法,在Android SDK Manager中删除Android SDK Build-tools高于Android SDK Platform-tools版本,但是发现自己下载的Android SDK Build-tools版本来就低于Android SDK Platform-tools版本。
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!报错

于是我又去寻找新的办法,终于找到了。
首先找到project.properties
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!报错

然后在其最后添加一行代码sdk.buildtools=25.0.0,如图所示:
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!报错

即可解决问题。

相关文章: