简体   繁体   中英

Android sdk manager not opening

My sdk manager is not opening..when i try to open it from within eclipse it displays :

[2014-02-01 17:37:06 - SDK Manager] [SDK Manager] 'xcopy' is not recognized as an internal or external command, [2014-02-01 17:37:06 - SDK Manager] [SDK Manager] operable program or batch file.

I had a problem opening eclipse itself but i solved it .. the problem was that sdk was searching for jre in the android sdk (eclipse) folder itself but it was in C:\\program files\\java\\jre7 .So i copyed jre7 from there to eclipse folder and renamed it to jre..and eclipse started working....BUT THE SDK MANAGER DOES NOT START IT JUST FLASES FOR a sec.

 Open sdk/tools/android.bat in notepad

 set java.exe path in android.bat file

 your java.exe path like that 

 set java_exe="C:\Program Files (x86)\Java\jre6\bin\java.exe" in android.bat file

Follow these steps and it help for me after a long time with all ways above not effect on windows7 64-bits, no need to have JAVA_HOME system variable or edit android.bat

  1. Download Android Studio within Android SDK, Java JDK 64 bits and Java JRE x86

  2. Install Java JRE first, then install Java JDK 64 bits, and the Android Studio last.

  3. Now you start Android Studio first (64 bits version) it require to have JAVA_HOME setting to run JVM, just copy the jdk.xxx(version) folder (my PC: jdk1.8.0_25 from "C:\\Program Files\\Java\\")folder to Android Studio folder and rename that folder (in Android Studio) to "jre" (jdk1.8.0_25 -> jre).

  4. Now it work for me to open Android SDK Manager from anywhere, if you want to use eclipse (not official now) just copy the java jre.xxx(version) x86 folder (from where you install before) to Eclipse and rename to "jre". After coping, choose the Android SDK path in Eclipse to use, It works for both Android Studio and Eclipse.

  5. Mind your antivirus if still refusing you (remove antivirus and install after you sure it not cause problem)!

1)go to sdk-tool-android.bat file and open it by right click then edit and then set java_exe path.Yo have to set path as in step 2

2)set java_exe=C:\\Program Files\\Java\\jre7\\bin\\java.exe Location of your JRE may vary as might installed in other location

3)After doing this Run Android studio as administrator and also run your Eclipse as administrator

Then Have Fun..

If you face an "xcopy" problem please try running sdk/tools/android.bat as admin. If it still happens this may mean that there is a problem with proper reading of a relative path in the batch, and in order to solve it you can amend one line of the batch from "xcopy %swt_path% %tmp_dir%\\%swt_path% /I /E /C /G /R /Y /Q > nul" to "C:\\Windows\\System32\\xcopy %swt_path% %tmp_dir%\\%swt_path% /I /E /C /G /R /Y /Q > nul"

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