25Answers
  • 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

SDK Manager.exe doesn't work

When I clicked SDK Manager on Program Files or run it in cmd, nothing happened. I did:

  1. Installed latest JDK
  2. Installed latest Android SDK
  3. Set environment JAVA_HOME and put %JAVA_HOME%\bin in path variable**

Actually a black cmd window appears and disappears a milliseconds.

How to fix it?

Edit:

I Googled day by day but can't find a solution for this. Even I set path for ANDROID_SWT it also can't run. I suspect that Android SDK has bug in its installation package.

I'm totally exhausted and this is the last my try:

  1. Uninstall JDK, Android SDK, remove all ANDROID or JAVA environment variables
  2. reinstall JDK and Android SDK

But nothing changes.

Edit:

Actually this is the second time I meet this problem. I got this problem only after I added more Environment variables for Ant and Maven. This is the summary:

Install Windows XP SP3 --> Install JDK --> Install Android SDK --> Open SDK Manager and it works! --> append some more "bin" path of Ant and Maven in "path" variable --> Open SDK Manager and it doesn't open --> I rolled back by removing all environment variables --> SDK Manager still no opens! That's very strange! --> It is stranger when I reinstall JDK and Android SDK, it still no opens! :(

Step #1: Open up a command prompt.

Step #2: Use the cd command to move to wherever you installed your Android SDK.

Step #3: Run tools\android.

If that does not work, you should have information dumped to the command prompt that will help you diagnose your setup problem.

  • 50
Reply Report
      • 1
    • It reports: "Unable to access jarfile librchquery.jar [INFO] Starting Android SDK and AVD Manager Invalid path ERROR: SWT folder '' does not exist. Please set ANDROID_SWT to point to the folder containing swt.jar for your platfo rm."
      • 2
    • Hey ...I was facing the same problem .. this solution worked for me .. after running the Android command, it successfully opened SDK Manager and works fine.Thanks.
      • 1
    • Worked for me, but I did need to run the command prompt as "administrator" else you get an "permission denied" and then "nothing to install"

I was getting the error "C:\Program is not recognized as an internal or external command" Followed by loads of "unable to copy file" Followed by something about Android_SWT not being able to be found.

The way I fixed the problem on my system (Windows 8, 64 bit, JDK 7) was:

  1. Create JAVA_HOME environment variable and point it to C:\Program Files\Java\jdk1.7.0_10\bin
  2. Open ANDROID SDK DIRECTORY\tools\android.bat in your favorite text editor
  3. Find the lines set java_exe= call lib\find_java.bat (it's split over 2 lines)
  4. Replace the lines with set java_exe="%JAVA_HOME%\java.exe"
  5. Save and run tools\android.bat

The problem was that the the space in the path was not being handled correctly. By wrapping the path in quotation marks, the space is then correctly catered for.

  • 13
Reply Report

I had the same problem.

when i run \tools\android.bat, i got the exception: Exception in thread main

 java.lang.NoClassDefFoundError: com/android/sdkmanager/Main

My resolved method:

  1. edit \tools\android.bat
  2. find "%jar_path%;%swt_path%\swt.jar"
  3. modify to "%tools_dir%\%jar_path%;%tools_dir%\%swt_path%\swt.jar"
  4. save, and run SDK Manager.exe again
  • 10
Reply Report
      • 2
    • Doing this made something happen when run from the command line. It starts downloading a bunch of xml files and other files. When it's running the :MkTempCopy section it sets tools_dir to the current directory. There appears to be a bug in this section.

After a lot of searching and trying different methods, I found the solution to the problem at my end: SDK Manager couldn't find my profile directory. After setting the environment variable ANDROID_SDK_HOME (I set mine to a newly created folder C:\Android), SDK manager started no prob.

  • 7
Reply Report
    • Can you clarify on this answer? Where is Android_SDK_Home even being referenced? In what files? What do I put in the C:Android folder?
      • 1
    • @Lars - I was not aware Android used ANDROID_SDK_HOME. Where did you latch onto ANDROID_SDK_HOME? I know it does use ANDROID_HOME, ANDROID_SDK_ROOT and ANDROID_NDK_ROOT, and the last two should both be set because the tools use them internally. Here's the reference on ANDROID_SDK_ROOT and ANDROID_NDK_ROOT: Recommended NDK Directory?. The fellow named Digit works on the NDK team.

I have Wondows 7 64 bit (MacBook Pro), installed both Java JDK x86 and x64 with JAVA_HOME pointing at x32 during installation of Android SDK, later after installation JAVA_HOME pointing at x64.

My problem was that Android SDK manager didn't launch, cmd window just flashes for a second and that's it. Like many others looked around and tried many suggestions with no juice!

My solution was in adding bin the JAVA_HOME path:

C:\Program Files\Java\jdk1.7.0_09\bin

instead of what I entered for the start:

C:\Program Files\Java\jdk1.7.0_09

Hope this helps others.... good luck!

  • 5
Reply Report

My issue was the following error on windows 7:

C:\dev\Android\android-sdk-windows\tools>android
[INFO] Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or
swt-win32 in swt.library.path, java.library.path or the jar file
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
        at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
        at com.android.sdkmanager.Main.showMainWindow(Main.java:292)
        at com.android.sdkmanager.Main.doAction(Main.java:276)
        at com.android.sdkmanager.Main.run(Main.java:99)
    at com.android.sdkmanager.Main.main(Main.java:88)

The solution was to disable McAfee 8.8. Apparently some recent update is now blocking my Android environment.

  • 2
Reply Report
      • 2
    • This is a workaround only. Disabling antivirus permanently to solve an install problem is bad practice. Was AV disabled just during install or turned off for good?

The way I solved your last problem was by right clicking the android.bat file, and chose edit with notepad++. I then went down to the part of the program where it had this bit of code:

cd /d %~dp0

It was also some other lines of code, but I deleted them. After deleting these other lines I simply just wrote(under the cd /d %~dp0):

cd Program Files

cd java

cd jdk1.7.0_03

cd bin

I dont know here you java.exe file is located but mine was at lest located there.

  • 2
Reply Report

I ran into this problem: I'd get the error

C:\projects\Android\android-sdk-windows-1.5_r1\tools\lib>ddms
02:03:07 E/ddms: shutting down due to uncaught exception
02:03:07 E/ddms: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the jar file
java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the j
ar file
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
        at org.eclipse.swt.graphics.FontData.<init>(Unknown Source)
        at com.android.ddms.PrefsDialog.setDefaults(PrefsDialog.java:221)
        at com.android.ddms.PrefsDialog.init(PrefsDialog.java:150)
        at com.android.ddms.Main.main(Main.java:74)

I got this solved by copying the swt file from eclipse into the tools directory. If you search in the directory you have Eclipse installed there is an SWT dll, named something like swt-win32-<4-digits>.dll (mine was named swt-win32-3740.dll): I copied that into the tools directory, and everything worked after that.

  • 2
Reply Report

Similar to sixty9 I renamed java.exe, javaw.exe, javaws.exe (I never delete files when troubleshooting) after I created a JAVA_HOME environment variable and added path variables.

I had installed the Java SDK on my D:\ drive ( instead of the default).

  1. Create a JAVA_HOME variable: Variable Name: %JAVA_HOME% Value: D:\Program Files\Java.

  2. Added the following to the Path variable:

    %JAVA_HOME%\jre7\bin;%JAVA_HOME%\jdk1.7.0_03\bin;
    
  3. Renamed java.exe, javaw.exe and javaws.exe.

  4. Restarted the system and the Android SDK installer found my JDK and installed successfully.

  • 2
Reply Report

And if tools\android works for you while .exe doesn't, it's probably the x64 java.

It started working when i completely uninstalled JDK with JRE (shows as separate option in windows uninstal control panel applet) and android sdk and reinstalled using x86 version.

Why does it worth the time, you may ask? Well, such an inconsistency obvoiusly means that amount of testing with x64 java is zero and so you can probably experience many other failures in the future.

  • 1
Reply Report

Finally got this torterous SDK to run.

When installing 32bit Java on 64bit windows system, set ANDROID_SWT to e:\android-sdk\tools\lib\x86

not ..\x86_64

Dear Android SDK team,

I genuinely hope some serious attention is being paid to these problems. SDK should be effortless to set up. This is how you lose customers to other platforms where this kind of thing is a one-click ordeal.

I was going to buy another android device to test my game on, but after last 2 days trying to traverse the maze of your incompetence I think i'll just stick with iOS as my main development target.

  • 1
Reply Report
    • I understand your sentiment so much right now. I'm on over 10 hours of trying to get this sht to work...it's amazing that this one problem has a million different solutions and everyone's solution is different and yet I still can't find a solution.

I solved this problem, which occured for me after manually installing the ADT (4.2/api 17) bundle on Windows 7 64 bit in C:\Program Files.

The steps I had to take:

  1. Set the JAVA_HOME environment variable to the installation directory of the (64 bit) JDK, C:\Program Files\Java\jdk1.7.0_11 in my case.
  2. Run SDK Manager as administrator at least once. SDK Manager allows you to change files in Program Files, so you should give it the proper access rights.
  • 1
Reply Report

None of the Solution worked for me

Just open sdk/tools/

Edit android.bat

Replace set java_exe="C:\Program Files\Java\jdk1.7.0_13\bin\java.exe" //your java path

Copy the sdk manager and avd from any tools/lib if its not in sdk/ base folder

  • 1
Reply Report