0

I am not able to launch SDK Manager from eclipse getting the below error.

[2013-07-17 15:41:31 - SDK Manager] [SDK Manager] Usage: java [-options] class [args...]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]            (to execute a class)
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]    or  java [-options] -jar jarfile [args...]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]            (to execute a jar file)
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager] where options include:
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -d32    use a 32-bit data model if available
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -d64    use a 64-bit data model if available
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -server     to select the "server" VM
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -hotspot    is a synonym for the "server" VM  [deprecated]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   The default VM is server.
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager] 
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -cp <class search path of directories and zip/jar files>
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -classpath <class search path of directories and zip/jar files>
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   A ; separated list of directories, JAR archives,
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   and ZIP archives to search for class files.
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -D<name>=<value>
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   set a system property
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -verbose:[class|gc|jni]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   enable verbose output
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -version      print product version and exit
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -version:<value>
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   require the specified version to run
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -showversion  print product version and continue
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -jre-restrict-search | -no-jre-restrict-search
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   include/exclude user private JREs in the version search
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -? -help      print this help message
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -X            print help on non-standard options
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -ea[:<packagename>...|:<classname>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -enableassertions[:<packagename>...|:<classname>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   enable assertions with specified granularity
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -da[:<packagename>...|:<classname>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -disableassertions[:<packagename>...|:<classname>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   disable assertions with specified granularity
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -esa | -enablesystemassertions
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   enable system assertions
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -dsa | -disablesystemassertions
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   disable system assertions
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -agentlib:<libname>[=<options>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   load native agent library <libname>, e.g. -agentlib:hprof
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   see also, -agentlib:jdwp=help and -agentlib:hprof=help
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -agentpath:<pathname>[=<options>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   load native agent library by full pathname
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -javaagent:<jarpath>[=<options>]
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   load Java programming language agent, see java.lang.instrument
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]     -splash:<imagepath>
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager]                   show splash screen with specified image
[2013-07-17 15:41:31 - SDK Manager] [SDK Manager] See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

Initially I was getting the below error

[2013-07-17 15:46:01 - SDK Manager] [SDK Manager] Error: Unable to access jarfile lib\archquery.jar
[2013-07-17 15:46:01 - SDK Manager] [SDK Manager] Invalid path

I replaced the below line

for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a

with

set swt_path=lib\x86_64

and now I end up getting the first message in the console window. I ran the android.bat file from command prompt and installed all the tools. I am able to create an android application and run it on my device but not emulator.

Image for Android download

s2s
  • 33
  • 1
  • 6

3 Answers3

0

First check 32 bit or 64 bit DOWNLOAD

in android.bat look for REFER

for /f %%a in ('%java_exe% -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a

replace with

set swt_path=lib\x86
Community
  • 1
  • 1
Ganesh Rengarajan
  • 2,006
  • 13
  • 26
0

never encountered this issue before. If your OS is 32-bit, you have to choose 32-bit JDK and 32-bit Android SDK. same for 64-bit. Have you double checked it?

yushulx
  • 11,695
  • 8
  • 37
  • 64
  • My OS is Win7 64bit, JDK 1.7.0_11 64 bit and about SDK, I am not sure as I could find only one download on android website(I updated my existing eclipse) – s2s Jul 17 '13 at 14:11
  • check Android website http://developer.android.com/sdk/index.html#download. you can choose 32 or 64 bit – yushulx Jul 17 '13 at 14:15
  • hey for SDK tools alone, I am unable to find any options to chose between 32/64. I can see that option for ADT bundle. – s2s Jul 17 '13 at 14:24
  • yeah. the ADT bundle includes both SDK and eclipse. if you cannot solve your current problem, why not to have a try of the whole bundle? :) you don't need to consider how to make configuration. Google has already done for you. – yushulx Jul 17 '13 at 14:31
  • Actually I tried that out first and I faced a few issues, not related to Android though, but Acceleo. And then switched to this, but now I am stuck at installation phase. – s2s Jul 17 '13 at 14:34
0

It's too late but may help for anyone who still can't fix this issue, follow these step 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.x.x.x(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.x.x.x(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)!

Hope it help for you.

AnHuy
  • 21
  • 4