1. 程式人生 > >Android:解決Failed to load D:\Android-Studio\sdk\build-tools\xx.xx.xx\lib\dx.jar

Android:解決Failed to load D:\Android-Studio\sdk\build-tools\xx.xx.xx\lib\dx.jar

  • Eclipse遇到如下錯誤:

    [2018-11-04 18:11:46 - Dex Loader] Failed to load G:\Android Tools\android-sdk-windows\build-tools\28.0.1\lib\dx.jar [2018-11-04 18:11:46 - HelloWorld] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

    原因:

    eclipse自動使用最高版本的SDK,ADT比SDK版本低導致

    解決辦法:

    1、用SDK Manager.exe下載低版本的build-tools,如25.0.2

    2、add this in the project.properties of your project:

    sdk.buildtools=25.0.2//設定sdk使用的buildtools版本