SecurityException: cannot find field for dex.jar android

Last night I upgraded to ADT-21 and restarted eclipse. Then eclipse said that you need to update the Android tool to version 21. I downloaded window_installer21 and installed it in the same place where my previous window_installer was installed. Therefore, it overwrites the file. Then I restarted the eclipse, and suddenly the whole project will stop working. Eclipse always opens with an error. SecurityException: Unable to find field for dex.jar

And when I try to start the project, it stops with the following error Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

SDK Manager also does not open.

I tried:

  • Clean up the whole project
  • Updated eclipse and computer about 20-30 topics.
  • Uninstall Android SDK, JAVA and reinstall it.
  • Setting path to find_java.bat file
  • Search after 6 hours over the Internet and read a specific form

This , this . this one too.

Nothing seems to work.

+5
source share
8 answers

A pop-up window will appear warning about the need to upgrade to the latest sdk and open the corresponding tool. I tried this (several times - restarted every time) without effect.

Instead, the answer was ...

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

  • Close eclispe.

  • Locate sdk on the disk - and run the standalone SDK Manager.exe (it seems to work when you first open it, but wait a second or two to display gui). Note. This is the same gui that was previously opened by eclipse!

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

  • Restart the tool - make all recommended updates and close.

  • Launch eclipse - the problem is gone!

+5
source

try installing fresh andoridSDK. the problem is the SDK, not your eclipse.

0
source

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

0
source

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

0
source

I had a similar problem after installing the latest Android / Eclipse directly from the Android developer site. I also saw another error related to find_java, claiming that it could not find Java in c: \ windows \ system32 \ java.exe. I previously used the MOTODEV studio a year ago (since then it has not been touched). I was worried that this could cause a conflict, so I deleted it. However, he left a few pieces in my c: \ Users \ folder. I blew away some hidden directories related to Android, as well as the androidsdks directory that was installed there, and also blew away my workspace folder. Then I launched Eclipse / SDK Manager, and everything was right with the world :)

0
source

Since I got this problem, I started using the Google ADT Bundle from http://developer.android.com/sdk/index.html
Now everything is all right.

0
source
  • Update Eclipse Packages: Help > Check for Updates
  • Update Android SDK: Window > Android SDK Manager
0
source

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

ie: if your username is "user32" and your Android SDK is placed in "C:\Program Files\Java\android-sdk" , after the upgrade you will probably have an outdated version of dx.jar in "C:\Users\user32\AppData\Local\VirtualStore\Program Files\Java\android-sdk\platform-tools\lib\"

0
source

All Articles