5

Yesterday evening I upgrade to ADT-21 and restarted eclipse. Then eclipse said that you need to update android tool to version 21. I downloaded window_installer21 and install it in the same location where my previous window_installer was installed. So it overwrite the file. Then I restarted eclipse and suddenly all project stop working. Eclipse always open with the error. SecurityException: Unable to find field for dex.jar

And when i try to launch a project it stops with the below error Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

SDK Manager is also not opening.

I have tried:

  1. Clearing all project
  2. Re stared eclipse and computer about 20-30 timmes
  3. Uninstall Android SDk, JAVA and reinstalled it
  4. Setting the path of find_java.bat file
  5. Searched 6 hour over internet and read some form

This, this.and this one also.

Nothing seems to work.

Community
  • 1
  • 1
Sunny
  • 13,174
  • 14
  • 76
  • 125

9 Answers9

5

A popup appears warning you to update to the latest sdk and opens the appropriate tool. Tried this (several times - restarting each time) with no effect.

Instead the answer was ..

  1. In eclispe, find the location of your android sdk (Window->Preferences->Android and the SDK location is at the top of the page).

  2. Close down eclispe.

  3. Find the sdk on the disk - and run the standalone SDK Manager.exe (It appears to fail when first opened - but wait a second or two for the gui to appear). Note - this is the same gui that was previously opened by eclipse!

  4. Take all the updates as recommended. A dialog box appears indicating that the management tool itself has been updated and should be restarted.

  5. Restart the tool - take any more updates recommended and close.

  6. Start eclipse - the problem has gone away!

K John Smith
  • 161
  • 6
0

try to install fresh andoridSDK. the problem is with SDK and not with your eclipse.

  • Thanks for answer. Toady when i stared eclipse all things become normal.Now all projects are working but still android sdk manager is not opening. – Sunny Dec 07 '12 at 16:38
  • why you want to open the androidsdk? do you mean to say that from eclipse -> windows -> preferences -> android -> while selecting here it is not showing the sdk options? – change_is_necessity Dec 10 '12 at 10:08
0

Update your Android tool/sdk with latest and create new workspace .it solved problem for me

Arvind_Kore
  • 1
  • 1
  • 3
0

I you got the same error message, but SDK manager works for you, run it with administrator privileges and delete both packages in Tools folder. Then install them again.

gingo
  • 3,039
  • 1
  • 20
  • 32
0

I was having a similar problem after installing the latest Android/Eclipse direct from the Android developer site. I was also seeing another error related to find_java claiming it couldn't find Java in c:\windows\system32\java.exe. I had previously used MOTODEV studio a year ago (haven't touched it since). I was concerned it might cause a conflict, so I uninstalled it. However it left some bits and pieces in my c:\Users\ folder. I blew away some hidden directories related to android, as well as an androidsdks directory that had been installed there and likewise blew away my workspace folder. Then I launched Eclipse/SDK Manager and all was right with the world :)

Chris
  • 124
  • 1
  • 8
0

Since I got this issue I started using Google ADT Bundle from http://developer.android.com/sdk/index.html
Everything is fine now.

Telmo Pimentel Mota
  • 4,013
  • 14
  • 22
0
  • Update Eclipse Packages: Help > Check for Updates
  • Update Android SDK: Window > Android SDK Manager
Alastair
  • 6,451
  • 3
  • 33
  • 29
0

This is caused by the existence of an older version of dx.jar in the VirtualStore (a folder where windows stores user versions of system and program files). Go to "C:\Users\<your user name>\AppData\Local\VirtualStore\<android-sdk path>" and delete all the content, or just the "\platform-tools\lib\dx.jar" file.

i.e: if your user name is "user32" and your android SDK is placed in "C:\Program Files\Java\android-sdk", after the update you'll probably have an obsolete version of dx.jar in "C:\Users\user32\AppData\Local\VirtualStore\Program Files\Java\android-sdk\platform-tools\lib\"

cluny
  • 16
  • 1
0

If the .jar file could not load try this..

locate android-sdks\build-tools\28.0.3\lib

delete the dx.jar file

Select the appropriate sdk tools that your android application works with thorugh sdk manager

Again search for

Here i am using apk 21.0.1

locate android-sdks\build-tools\21.0.1\lib

Cut the dx.jar file and paste it in the android-sdks\build-tools\28.0.3\lib folder

Hemananth
  • 7
  • 5