简体   繁体   中英

Eclipse android sdk bundle can't open Android SDK Manager

I downloaded new Android and Eclipse bundle in my new notebook (Window 7 64 bit) then I open my old files that I used to work in PC.When I open, it shows some error about version API and that I should fix it in SDK Manager, But when I try to open the SDK Manager it won't run and shows this error in console.

[2555-11-20 10:27:27 - Dex Loader] SecurityException: Unable to find field for dex.jar
[2555-11-20 10:36:02 - SDK Manager] [SDK Manager] Failed to convert path to a short DOS path: C:\Windows\system32\java.exe

How can i fix that ??

In android_sdk\\tools\\lib there's a batch-file called find_java.bat . It calls find_java.exe -s to find a list of potential Java locations. Running the exe file like this returns the error I've been seeing:

Failed to convert path to short DOS path: c:\windows\system32\java.exe

-s stands for short. Running it without the -s causes find_java.exe to work, causing find_java.bat to work, causing everything else to work. So the fix was to edit find_java.bat, and remove the -s .

Try this:

  1. go to adt-bundle-windows\\sdk\\tools

  2. Right-click on android.bat and say "Run as Administrator"

It will open up the sdk manager.

Removed all existing eclipse & android versions

I downloaded latest version of eclipse & latest android SDK ..and installed them..

Took me 30 mins which was better than being stiuck for more than 3 days even after trying all procedures mentioned in various blogs & links...

Try above as the last option

Need help with SDK it boots up but the dos flashes open and closes fast. I installed the 7.1 79 Java on my Windows 32 bit desktop. I installed the Android and Eclipse bundle. I tried running android.bat by administrator. I tried this for Windows.

You need to create an environment variable called JAVA_HOME and set it to your JDK installed directory.

First, take note of your JDK installed directory. The default is c:\\Program Files\\Java\\jdk1.8.0_{xx} , where {xx} is the latest upgrade number. It is important to verify your JDK installed directory, via the Computer, before you proceed further.

Start a CMD shell, and issue the command set JAVA_HOME to check if variable JAVA_HOME has been set:

> set JAVA_HOME

Environment variable JAVA_HOME not defined If JAVA_HOME is set, check if it is set to your JDK installed directory correctly. Otherwise, goto next step.

To set the environment variable JAVA_HOME in Windows 2000/XP/Vista/7/8:

Push Start button ⇒ Control Panel ⇒ System ⇒ (Vista/7/8) Advanced system settings ⇒ Switch to "Advanced" tab ⇒ Environment Variables ⇒ System Variables ⇒ "New" (or "Edit" for modification) ⇒ In "Variable Name", enter "JAVA_HOME" ⇒ In "Variable Value", enter your JDK installed directory (eg, "c:\\Program Files\\Java\\jdk1.8.0_{xx}").

To verify, RE-START a CMD shell (need to refresh the environment) and issue:

set JAVA_HOME

I also tried opening the android.bat and editing it with my java 7.1.79.

If you have Android studio loaded it kills the contents of the ~/android.bat and most other files in the sdk directory that the SDKManager needs to run. I had to install the Android SDK in a secondary directory, then copy over the contents into my actual SDK directory. This allows the SDKManager in Eclipse to function again and keeps your SDK updates. If you install Eclipse after installing Android Studio, then this problem does not occur.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM