Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 469
Adonis K. Kakoulidis Avatar asked Mar 08 '11 04:03

Adonis K. Kakoulidis


4 Answers

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

Solution:

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

and copy it to:

{Android SDK dir}\platform-tools\lib\

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

(If platform-tools\lib 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}\platforms\android-4\tools\lib\. (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... :-(

like image 153
Ognyan Avatar answered Nov 09 '22 15:11

Ognyan


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

like image 41
fredy Avatar answered Nov 09 '22 14:11

fredy


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!

like image 38
Verdigrass Avatar answered Nov 09 '22 15:11

Verdigrass


I had this problem in Eclipse since I upgraded from build-tools 25.0.0 to 26.0.0

I just add "sdk.buildtools=25.0.0" in my project.properties and it works again

my project.properties:

target=android-23
sdk.buildtools=25.0.0
android.library.reference.1=../design
like image 10
Elyas Nategh Avatar answered Nov 09 '22 14:11

Elyas Nategh