1. 程式人生 > >eclipse升級Android SDK Tool版本到25.2.5後運行項目報錯Unable to build: the file dx.jar was not loaded from the SDK folder

eclipse升級Android SDK Tool版本到25.2.5後運行項目報錯Unable to build: the file dx.jar was not loaded from the SDK folder

com 但是 概述 details bsp 更新 href unable 解決辦法

概述

由於最近通過SDK-Manager更新了build-tools,當要用到dx.jar這個包時,自動調用最新版本Android SDK build-tools中dx.jar,但是運行android項目時Console卻提示:

技術分享圖片

解決方案

解決辦法就是:確保dx.jar這個文件在build-tools\lib和選擇的Andriod SDK Tools版本一致就可以。

我用的 Android SDk build-tools 最新版本是 28.0.3,安裝的Andriod SDK Tools版本是25.2.5,兩個版本要一致,所以我用Android SDk build-tools 25.0.3版本的dx.jar文件覆蓋最新版本28.0.3中的dx.jar文件,然後重啟Eclipse就可以了。

技術分享圖片

備註:dx.jar文件所在目錄:{sdk安裝目錄}\build-tools\{版本號}\lib

比如:

技術分享圖片

參考資料

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!

關於解決Eclipse報錯顯示Unable to build: the file dx.jar was not loaded from the SDK folder

eclipse升級Android SDK Tool版本到25.2.5後運行項目報錯Unable to build: the file dx.jar was not loaded from the SDK folder