SecurityException: Can not find the field for dex.jar android

advertisements

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.


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!