软件编程
位置:首页>> 软件编程>> java编程>> Eclipse运行android项目报错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的解决办法

作者:franksight  发布时间:2023-06-14 15:28:30 

标签:eclipse,android,报错

由于最近通过SDK-Manager更新了build-tools,当要用到dx.jar这个包时,自动调用最新build-toolsdx.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)找到你AndroidSDK安装目录C:\Program Files (x86)\Android\android-sdk,进入build-tools文件夹

(2)发现还有很多其他版本的build-tools,而且版本都是顺序排列的,我们就任意选择一个(只要不是最新版的就行),打开进入lib文件夹

(3)发现里面有dx.jar包,复制粘贴到最新版build-tools存放dx.jar包的目录下,替换掉原来的dx.jar包(C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.0-preview\lib\dx.jar)

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

来源:https://blog.csdn.net/whj9073/article/details/76157557

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com