Android ADT error, dx.jar was not loaded from the SDK folder

I just downloaded Eclipse Galileo and installed ADT10 and tried to a phonegap app using this guide: http://www.phonegap.com/start But each time i try to build im getting this error: Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

I know that there are already some questions/answers about it in this forum but they didnt work for me.


This is caused by incomplete/messy upgrade to latest version which results in dx.jar missing from {Android SDK dir}platform-toolslib .

Solution:

Find your latest dx.jar in {Android SDK dir}platforms*

and copy it to:

{Android SDK dir}platform-toolslib

Restart eclipse, clean your project and everything should work as expected.

(If platform-toolslib directory is missing entirely you will have to reinstall "Android SDK platform-tools" using SDK manager. After reinstall dx.jar should be in there so no copying will be needed)

If you can't find dx.jar in any of {Android SDK dir}platforms* subdirs you will have to start SDK manager and install Android 1.6 SDK.

For example on my machine latest was in {Android SDK dir}platformsandroid-4toolslib . (I did not find any newer version as of 2012-01-22 Android SDK R15).

I really hope that this is useful for someone because I've wasted half a day investigating and looking for solution of such a trivial bug... :-(


platform-toolslib folder was missing after upgrade (my eclipse was open). close eclipse, using sdk manager uninstall and install "Android SDK platform-tools".


I just encountered the same problem yesterday, in Eclipse of Neon Release (4.6.0).

It's a compatible issue related to 26.0.0 of android-sdk "build-tools".

Simple Solution:

  • Delete "26.0.0" in "build-tools" directory
  • Use "25.0.2" instead
  • Restart eclipse
  • Other Solution:

  • add this in the project.properties of your project:
    sdk.buildtools=25.0.2
  • Good luck!

    链接地址: http://www.djcxy.com/p/63512.html

    上一篇: 什么是Android SDK中的dx.jar?

    下一篇: Android ADT错误,dx.jar未从SDK文件夹加载