Related
I downloaded Android Studio and attempted to launch the program.
This is running on Windows 7 64-bit with Java 1.7. During the installation, my Java 1.7 is detected, and the rest of the installation goes through just fine. However, when attempting to launch the application from the desktop icon, nothing happens. Looking at the task manager, a new process from the CMD is loaded. This is because it's attempting to run the batch file studio.bat.
When I execute via CMD, I get the following error:
ERROR: cannot start Android Studio. No JDK found. Please validate
either ANDROID_STUDIO_JDK or JDK_HOME or JAVA_HOME points to valid
JDK installation. ECHO is off. Press any key to continue . . .
I've attempted to open the idea properties file to see if there was something I could configure for this ANDROID_STUDIO_JDK or something like that. However, I found nothing. I hope some of you can let me know if you were able to install this or if you are having problems as well.
Adding a system variable JDK_HOME with value c:\Program Files\Java\jdk1.7.0_21\ worked for me. The latest Java release can be downloaded here.
Additionally, make sure the variable JAVA_HOME is also set with the above location.
OK, I figured out how fix this nasty bug.
Before you start
Go to your Android Studio installation folder and locate the bin folder. Inside the bin folder, you will find studio.bat. Execute the file, and it'll show the error. If it is about the Java path then follow the tip 1.
Tip 1
When you set the path JAVA_HOME, etc., make sure not to include bin at the end of the path. This solved the issue for me.
JAVA_HOME => C:\Program Files\Java\jdk1.7.0_21
path => C:\Program Files\Java\jdk1.7.0_21\bin
It works fine with JDK 1.7 (I tried with 32 bit).
If you do so, you can see the initial screen as below.
Tip 2
Are you getting the below error message?
Your Android SDK is out of date or is missing templates. Please ensure
you are using SDK version 22 or later.
This error probably occurs, because you have reference to your older SDK (that you downloaded with Eclipse) in your path variable. Go to Environment variables and remove any reference to the old SDK folder and point it to new SDK folder that is found inside the Android Studio installation folder.
Save and restart Studio, things should work as expected now.
Tip 3
If you hate messing around with the path variable as given above by removing old references, simply follow the following steps to refer to new SDK path that comes with Studio.
*Project Defaults* -> *Project Structure* -> Click "New" -> Select "Android SDK" -> Select the SDK folder inside the studio installation.
With the last update of Android Studio, I have two versions of the IDE's launcher
One is called studio.exe and the other studio64.exe they are both on:
C:\Users\myUserName\AppData\Local\Android\android-studio\bin
You have to launch the one that matches your Java version 64 or 32 bit
I had the same issue. I got resolved setting up correctly the environment variables in windows, for instance:
JAVA_HOME -> C:\Program Files\Java\jdk1.6.0_45
path -> C:\Program Files\Java\jdk1.6.0_45\bin
I've tried so many of the answers here but none of them works, so I decided to mix some of the answers here and I am successful!
Step 1: Go to the system properties by right-clicking on My Computer or by pressing windows button on typing This PC and right clicking on it and selecting Properties.
Step 2: Click the advanced system settings or Environment Variables
Step 3: Take note that there are 2 different variable. What you need to create is system variables not user variables, when you clicked new type the following
Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.8.0_25\ (Note: Please check if the path is right, sometimes it is C:\Program Files (x86)\Java\jdk1.8.0_25)
Step 4: Run the android studio, no need to restart.
Note:
*C:\Program Files\Java\jdk1.8.0_25\ depends entirely on the installation path of your JDK not JRE so don't be confused if you see something like the picture below. Just enter the location of your jdk, in my case it is C:\Program Files\Java\jdk1.8.0_25\.
*Do not include the bin folder when you enter the Variable value.
Edit: For Windows 8 and 10 Users: Try to run C:\Program Files\Android\Android Studio\bin\studio.exe instead of C:\Program Files\Android\Android Studio\binstudio64.exe
I had the same issue. I am having 64-bit windows 8. I downloaded the android studio which worked on a 32-bit machine but not on my 64-bit.
The solution for me was pretty simple. I navigated to
C:\Program Files (x86)\Android\android-studio\bin
there I saw 2 exe files studio.exe and studio64.exe. Normally my start menu was pointing to studio64.exe which always kept on giving me "The environmental variable JDK_HOME does not point to valid JVM". So then I clicked studio.exe and it worked :)
I hope this may help someone facing the same problem as me
The path for the latest JDK. It worked very well.
If you are getting message "Your Android SDK is out of date…" — click "Configure" —> "Project Defaults" —> "Project Structure", pick "SDKs" —> "Android SDK" and in a "Build Target" choose "Android 4.2.2". Click "OK". Now it should work fine.
I got the problem that the installation stopped by the "$(^name) has stopped working" error. I have installed the Java SE Development kit already, and also set both SDK_HOME and JAVA_HOME that point to "C:\Program Files\Java\jdk1.7.0_21"
My laptop installed with Windows 7 64 bits
So I tried to install the 32-bit version of the Java SE Development kit, and set my JAVA_HOME to "C:\Program Files (x86)\Java\jdk1.7.0_21", restart and the installation worked OK.
This problem has been fixed in Android Studio v0.1.1, so just update Android Studio and it should work.
Sometimes you can resolve this type of issue by setting environment variables so the process looks for the JDK in the right spot.
Another approach is to figure out where the process is looking, then put your JDK there.
I've had lots of success using Process Monitor from Sysinternals:
Start -> Run -> procmon
Go to the Filter menu, then select Filter...
Set Event Class is File System then Include
Add, then OK
This will filter down to all the file system operations taking place on your machine.
You could try filtering based on the result of the File System operation:
Right click on the Result column, then Exclude 'SUCCESS'
You can also quite easily filter based on the process name, either from the Filter... menu option or by right clicking on the Process Name column and selecting Include 'process.exe'.
Once you find the file system operation that's failing, the Path column will tell you where to put your JDK.
I've found this to be very empowering. Especially compared to the frustrating process of changing environment variables by trial and error.
My issue was caused because I have an & character in my Windows user name, so when installed in the default path I was getting the following error after running bin/studio.bat
|
v notice broken path
The system cannot find the file C:\Users\Daniel \studio64.exe.vmoptions.
Exception in thread "main" java.lang.NoClassDefFoundError: com/intellij/idea/Main
Caused by: java.lang.ClassNotFoundException: com.intellij.idea.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: com.intellij.idea.Main. Program will exit.
So I uninstalled and reinstalled it to program files and it launches fine now.
I couldn't get this to work no matter which environment variables I set. So I simply put a copy of the JDK into my Android Studio installation folder.
Copy the contents of the JDK installation (for example, C:\Program Files (x86)\Java\jdk1.7.0_21)
Paste them into the installation directory of the Android Studio (for example, C:\Program Files (x86)\Android\android-studio)
I somewhat assumed that the issue was caused by having the x64 version of the JDK installed. But what was especially confusing was the fact that I could start Android Studio just fine when I started the studio.bat as an Administrator (even though the environment variables were set for my personal user account).
studio.bat will look for several valid options when determining which JDK to use.
:: Locate a JDK installation directory which will be used to run the IDE.
:: Try (in order): ANDROID_STUDIO_JDK, ..\jre, JDK_HOME, JAVA_HOME.
As explained above, I picked the ..\jre option.
Today I found another situation when this problem occures - when you have several JDK, defined in JAVA_PATH. I have:
JAVA_HOME = C:\JAVA\JDK\jdk1.6.0_38;C:\JAVA\JDK\jdk1.7.0_10
So I received this problem with Android Studio setup
But when I've removed one of JDK - problem has been solved:
JAVA_HOME = C:\JAVA\JDK\jdk1.7.0_10
Installation wisard found my jdk and i had a nice night to study studio.
But unfortunatelly even installed studio doesn't work with several jdk.
Does anybody know how to fix it?
I hope I've helped someone
Add JAVA_HOME and JDK_HOME system environment variables.
Right-click
android studio (the 64 version if that's your OS and JDK) and go to
compatibility tab and set "Run as administrator" to true.
Run android studio and high-five me virtually when it works.
If that fails, try "where java" in cmd.exe. If it lists c:\system32\java.exe first, then rename the file and try again.
Windows 64 bit, JDK 64 bit (Solution that worked for me)
Tried all the above solutions, and None of them worked, I have been trying to solve it for the past few days and now I did it successfully. For me the problem was when I first installed Android Studio my JDK version was 1.7, then after installing I updated the JDK to 1.8, then I removed the old JDK folder and everything was messed up, even uninstalling and reinstalling android studio randomly didn't solve the issue.
Below is the solution that worked for me
Uninstall Android Studio.
clean temp files and android studio C:\Users\Username.AndroidStudio1.5
Uninstall JDK.
Now without JDK try to install Android Studio and now it will show the message that it can't find any JDK. Stop installation
Install JDK 1.7 or 1.8 (Set JAVA_HOME, JDK_HOME, path Environment variables as explained by everybody above)
Install Android Studio.
Done. Enjoy and happy coding.
MAKE SURE YOU RESTART ANDROID STUDIO
Even though I should know better and swear I did, make sure you restart studio after making these changes as it clearly does not check them on every build (which to me makes sense that system/user variables should only be read once on startup)
Anyway, yea... Make sure you restart after you make these changes.
Path = to the bin folder in the jdk folder (path already exists)
JAVA_HOME = to the jdk folder
Install the latest JDK in your system from JDK 7 and JRE 7 Installation Guide.
JAVA_HOME -> C:\Program Files\Java\jdk1.7.0_4
path -> C:\Program Files\Java\jdk1.7.0_4\bin
If setting the JAVA_HOME variable doesn't work for you, set:
STUDIO_JDK=C:\Progra~1\Java\jdk1.8.0_172
Where the path points to your JDK installation
This is the only thing which works for me in Windows 32bit with Android 10 and up.
In my experience, I was unable (even after adding JDK_HOME) to launch Studio via either the shortcut or studio.exe itself. I had to first run bin/studio.bat (mentioned in the original question).
After the first successful launch, I'm able to start it with the shortcut.
If you have a 64 bit windows OS, pointing the JAVA_HOME system variable to
C:\Program Files (x86)\Java\jdk1.7.0_21
Will work when
C:\Program Files\Java\jdk1.7.0_21
fails to work.
You need 1.7 JDK installed on your system. Add a system variable with:
name: ANDROID_STUDIO_JDK
path: your JDK path (for example, C:\Program Files\Java\jdk1.7.0_21)
See more at FIX: Android Studio - Installation Issues on Windows 7 | ERROR: cannot start Android Studio. No JDK found.
TRY TO INSTALL 32BIT JDK
if you have jdk installed and had set up the System Varibles such as JAVA_HOME or JDK_HOME
and tried click back and then next ,you might have installed the 64bit JDK,just download the 32bit jdk and install it.
I downloaded the latest jdk version
JAVA_HOME to C:\Program Files\Java\jdk1.8.0_11\bin
Set the PATH to C:\Program Files\Java\jdk1.8.0_11\bin
I restarted the STUDIO and it worked.
On Windows 10, restarting the installer and running as admin worked for me.
To complete this stack of possible solutions: For me the problem was, that I did not execute the Android-Studio-Setup as administrator. Running it as administrator then made me able to install Android-Studio.
For me, the problem was that I had changed the GC vm arg to -XX:+UseParallelGC in the C:\Users\<username>\.AndroidStudio2.1\studio64.exe.vmoptions file. That's what I use in Eclipse and I was trying various things to get AndroidStudio half way as efficent as Eclipse. I restored the GC to -XX:+UseConcMarkSweepGC.
The answer to the original question is that, might be you are opening android studio from 32 bit shortcut icon of android studio, try to open from icon "studio64" located under .../bin/ where android studio setup is install.
In case you had it running but Now it doesn't Launch.
I deleted the C:\Users\<NAME>\.AndroidStudio<version>\ folder and it worked.
I just wasted one morning trying to get SQL developer to work on my current setup:
OS: Windows 8.1 virtual machine running on mac via Parallels.
No oracle client or instant client installed
No Java installed
The reproducible steps are
I downloaded SQL Developer for Windows with JDK (all 64-bit) and unzipped it to C:/Program Files/.
I double clicked on C:/Program Files/sqldeveloper/sqldeveloper.exe
I get the following message:
Unable to launch the Java Virtual Machine
Located at path:
C:/Program Files/sqldeveloper/jdk/jre/bin/server/jvm.dll
Can someone please help me? I also tried first installing Java 1.8 (64 bit) and then the SQL developer version without Java. This doesn't work either. When I select the location of the JDK home, it also sent one error message saying that it couldn't find any JVMs where I said. To add insult to injury, every time I follow this procedure, the Panda antivirus tells me that sqldeveloper is infected, deletes the file and encourages me to restart.
Can someone please help me? I would mostly appreciate.
Thank you very much in advance
I had the same problem and solved it by copying the MSVCR100.dll file from sqldeveloper\jdk\jre\bin to the sqldeveloper\sqldeveloper\bin folder.
Credit goes to Erik Anderson from SQL Developer failed to start
Note that different versions of SQL Developer need different versions of MSVCR*.dll. Various comments below have offered which versions worked for them.
Create directory bin in
D:\sqldeveloper\jdk\
Copy
msvcr100.dll
from
D:\sqldeveloper\jdk\jre\bin
to
D:\sqldeveloper\jdk\bin
I had a similar issue when opening the sql developer it gave me the below error
Unable to launch the Java Virtual Machine due to missing file MSVCR100.DLL
I was using JDK 8 and windows 64 bit version. Also I downloaded the oracle sql developer software with no jdk/jre option since I already have jdk 8 installed in my system. While double clicking the sqldeveloper.exe file, it asked me to input the path of the JDK. I gave the path and then it gave me the JVM MSVCR100.DLL error.
I checked inside the C:\Program Files\Java\jdk1.8.0_271\jre\bin and couldnt find the MSVCR100.DLL file there.
Then after searching the microsoft forum, understood this dll is part of the 64Bit: Microsoft Visual C++ 2010 SP1 Redistributable Package (x64).
After installing the above microsoft package I am able to find the dll under C:\Windows\System32
Then did the below,
Copied the C:\Windows\System32\msvcr100.dll --> C:\Program Files\Java\jdk1.8.0_271\jre\bin
This resolved the error and I was able to open up the Oracle SQL developer when it found the right dll.
If folder sqldeveloper/jdk doesn't contain folder bin,
you can copy folder bin from folder sqldeveloper/jdk/jre into sqldeveloper/jdk.
Depending on the issue, whether it's JAVA home path not correctly set or missing msvcr100.dll file, follow the below methods to rectify the problem:
1. Issue with JAVA home path not correctly set:
Follow these steps:
Go to directory where SQL Developer is installed.
Open the /bin directory.
Open sqldeveloper.conf in any editor to edit.
Remove the complete line starting with "SetJavaHome"
If you see: SetJavaHome ../../jdk, this is probably the wrong config file.
Instead, for try something like: C:\Users\${username}\AppData\Roaming\sqldeveloper\4.2.0\product.conf
Or: C:\Users\${username}\Application Data\sqldeveloper\4.2.0\product.conf
Save and close the file
Start SQL Developer again.
Provide the JAVA_HOME path, e.g., C:\Program Files (x86)\Java\jdk1.8.0_92
Important: Do not include suffix \bin\java.exe
Important: If running 32-bit SQL Developer, be sure to use a 32-bit JVM. (Same for 64-bit.)
2. Issue with missing msvcr100.dll file:
OP stated the following in his comments below:
If I first install the jdk and then sql developer without Java, it
tells me Unable to launch the Java Virtual Machine Located at path:
C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll
So, the error message is clear:
Unable to launch the Java Virtual Machine Located at path:
C:/Program Files/Java/jdk1.8.0_45/bin/msvcr100.dll
Follow these steps:
copy:
MSVCR100.dll
from:
sqldeveloper\jdk\jre\bin
to:
sqldeveloper\sqldeveloper\bin
And relaunch SQL Developer again.
What is msvcr100.dll file?:
msvcr100.dll is a part of Microsoft Visual C++ and is required to run programs developed with Visual C++. Some applications like SQL Developer in the question, needs the file in the SQL Developer installation folder.
What options are available to fix the issue?:
Copying it from Windows systemfolder to the installation folder of application should fix the problem. Also, you could add the PATH to the msvcr100.dll file based on 32/64 bit requirements. If the local file itself is deleted or corrupt by any chance, then it could be downloaded online or could also be reinstalled via Microsoft visual C++ 2010 Redistributable package. It is important to use the correct version based on the software. Use the 32bit dll file for 32bit software, and 64bit dll file for 64bit software.
I run into the same error message when trying to install SQL Developer from "Windows 64-bit with JDK 8 included" zip file in my Windows 10 Enterprise.
Launching the most recent SQL Developer version 4.1.3 in Windows 10 shows an error:
Unable to launch the Java Virtual Machine Located at path:
C:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\jdk\jre\bin\server\jvm.dll
The path exists and is valid.
The same zip file works on Windows 7 Professional.
The problem was a missing msvcr100.dll.
I simply copied C:\Program Files\Oracle\VirtualBox\msvrc100.dll to C:\Users\<USER>\Downloads\sqldeveloper-4.1.3.20.78-x64\sqldeveloper\sqldeveloper\bin\ and SQL Developer started to work.
The details can be found from Issue running SQL Developer x64 4.1.3 with JDK.
Funny that Oracle VirtualBox team can include the dll into the installation package but Oracle SQL Developer team can't.
Today I try to use oracle client 64 and failed connect Connection Identifier which is defined at tnsnames.ora file. I assume that try to connect Oracle 32 Bit Server using SQL Developer 64 bit. That is why I install new jdk x86 and trying to change jdk path but this error happened:
Trying to download SQL Developer 32 Bit, but at the site said that the bundle support both 32 bit and 64 bit depend on java installed.
Windows 32-bit/64-bit: This archive. will work on a 32 or 64 bit
Windows OS. The bit level of the JDK you install will determine if it
runs as a 32 or 64 bit application. This download does not include the
required Oracle Java JDK. You will need to install it if it's not
already on your machine.
My java home is 64 bit. New installed 32 bit jdk is not set at java home.
I need to open $User_dir\AppData\Roaming\sqldeveloper\version\product.conf
Remove line SetJavaHome C:\Program Files\Java\jdk1.8.0_201
Start sqldeveloper.exe instead of sqldeveloper64W.exe
New popup will shown and choose java home to new jdk version (32 bit mine) :
C:\Program Files (x86)\Java\jdk1.8.0_201
My fault, I pin sqldeveloper64W.exe to taskbar, why that error occured then after I move cursor and it was sqldeveloper64W.exe, I try to click sqldeveloper.exe, then I found that my setting is goes well.
So check it maybe it was happened on your system too. If sqldeveloper.exe does not working, try to choose sqldeveloper64W.exe.
Now I can call my Connection Identifier which is defined at tnsnames.ora using new setting SQL developer 32 bit mode.
This is because sqldeveloper.conf has an entry for the java home being used
look at this solution
I have followed the steps and it worked just fine.
1) Open the file present at : \sqldeveloper-3.2.20.09.87\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf and delete the line with setJavaHome xxx .
2) Click on Sqldeveloper.exe now and browse for the java.exe present in \sqldeveloper-3.2.20.09.87\sqldeveloper\jdk\jre\bin
3) This should launch SqlDeveloper now.
Thanks.
For Windows Users: If anyone downloaded a non-jre version and faced issue, then later trying with the JRE version and still facing the issue, you need to delete SQLDeveloper folder inside "%AppData%\sqldeveloper". After deleting try opening sqldeveloper.exe again.
This looks like you might not have enough memory allocated to your Windows VM. If the JVM is configured to use more (maximum) memory than is available then you'll get this sort of error message.
You can read more about SQL Developer's memory at (that) Jeff Smith's blog.
The default settings still seem to be -Xms128m -Xmx800m. I can generate a similar error by setting -Xmx to be large than the physical RAM in my (physical) PC. So with the default settings, you will have problems if you don't have 800m of memory allocated to Windows. That doesn't seem like much, but it seems to be in the recommended window based on this knowledgebase article.
While you could attempt to reduce the JVM requirements in your product.conf file that will likely lead to other issues later, if it works at all. So increase your Windows VM memory allocation, reboot, and try to launch SQL Developer again.
Create directory "bin" in
D:\sqldeveloper\jdk\
Copy
msvcr100.dll
from
D:\sqldeveloper\jdk\jre\bin
to
D:\sqldeveloper\jdk\bin
I know that people may frown on a youtube example but this worked for me and I was getting the same issue
https://www.youtube.com/watch?v=ex1dyu0Px8U
It will direct you to add the correct Environmental Variables for the JDK.
System Properties>Advanced>Environment Variables>Path>
\sqldeveloper\jdk\bin
AND
\sqldeveloper\jdk\bin\server
I had the same problem:
The point here is to point on the java.exe binary under Oracle client installation and not the JDK installation under Program Files.
Installing jdk1.8.0_211 and setting the below variable in product.conf (located in C:\Users\\AppData\Roaming\sqldeveloper\19.1.0) to JDK8 home worked for me
SetJavaHome D:\jdk1.8.0_211
I was trying to use the sqldeveloper that comes with the Oracle installation under:
C:\oracle\product\11.2.0\dbhome_1\sqldeveloper
I tried most of the suggestions in this post to no avail, so I downloaded the one from oracle's download page (you must register) which asks for the location of the jdk folder (rather than the location of java.exe). This worked for me without any problems.
I couldn't find the file in C:\Program Files\Java\jdk1.8.0_261\jre\bin. My sqldeveloper came without jre at all so what it worked for me was copying the file from an older Oracle jre release to C:\Program Files\Java\jdk1.8.0_261\jre\bin.
Step 1, go to C:\Users<you>\AppData\Roaming, delete the whole folder [sqldeveloper]
Step 2, click on your shortcut sqldeveloper to start Sql developer
Step 3, the window will popup again to ask for a JRE location, choose a suitable one.
If it still doesn't work, execute again from step 1 to 3, remember to change JRE location every time until it works.
I am working on a fingerprint recognition Java application for a university project.
We bought Suprema Biomini Scanner and SDK and I have installed the SDK on my Windows 8 machine.
I am using Netbeans IDE and I am trying to run the demoUFEJavaJNA.java file.
The GUI for the sample program launches and when I press init, I get the following output with error 101 which means the System has no license.
My UFScanner.dll and UFMatcher.dll are located in my Netbeans project workspace and I have put a copy of UFLicense.dat there as well.
Still the error persists. Any idea how to fix this?
Had the same problem and tried (as the documentation says) to put UFLicense.dat in the same directory of the DLLs, that is, root of where I was developing/debugging, then I put a copy of the DLL and DAT files on C:\Windows\system32 and C:\Windows\SysWOW64, and it worked
NOTE: On System32 you should put the x64 version of the DLLs, while on SysWOW64 the 32 bit version, is a little tricky, but you can check about this on
Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?
When I clicked SDK Manager on Program Files or run it in cmd, nothing happened. I did:
Installed latest JDK
Installed latest Android SDK
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.
Android installation - sdk manager.exe does not work
Android installation/SDK Manager issues
I'm totally exhausted and this is the last my try:
Uninstall JDK, Android SDK, remove all ANDROID or JAVA environment variables
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.
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:
Create JAVA_HOME environment variable and point it to C:\Program Files\Java\jdk1.7.0_10\bin
Open ANDROID SDK DIRECTORY\tools\android.bat in your favorite text editor
Find the lines set java_exe= call lib\find_java.bat (it's split over 2 lines)
Replace the lines with set java_exe="%JAVA_HOME%\java.exe"
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.
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:
edit \tools\android.bat
find "%jar_path%;%swt_path%\swt.jar"
modify to "%tools_dir%\%jar_path%;%tools_dir%\%swt_path%\swt.jar"
save, and run SDK Manager.exe again
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.
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!
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.
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.
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.
I solved my problem opening android.bat inside sdk/tools and setting the java_exe property, which was empty.
set java_exe="C:\Program Files\Java\jre6\bin\java"
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).
Create a JAVA_HOME variable: Variable Name: %JAVA_HOME% Value: D:\Program Files\Java.
Added the following to the Path variable:
%JAVA_HOME%\jre7\bin;%JAVA_HOME%\jdk1.7.0_03\bin;
Renamed java.exe, javaw.exe and javaws.exe.
Restarted the system and the Android SDK installer found my JDK and installed successfully.
I add new environment variable "ANDROID_SDK_HOME" and set it, like my path to android SDK folder (c:/Android) and it's work!
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.
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.
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:
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.
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.
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
I FINALLY GOT THIS WORKING AFTER 2 SOUL DESTROYING EVENINGS OF TRYING! IF I EVER MEET AN ANDROID SDK DEVELOPER I WILL HACK HIM TO DEATH WITH HIS OWN KEYBOARD
Anyway, tips for getting it working on Windows 7 64 bit...
I suspect for me it was multiple problems as none of the suggestions worked so I will list all the things I did to finally get it working
1) Install the 32 BIT version of Java JDK (yes, even if you are running 64bit Windows)
2) Install both the SDK and the JDK to paths that have no spaces in (I used C:\Android and C:\Java32)
3) In the Windows environment variables screen (System Properties > Advanced Settings > Env vars), there's two places you can enter the variables, the "User Variables" and "System variables". I put them in both and included the "bin" bit in both e.g.
JAVA_HOME = C:\Java32\jdk1.8.0_20\bin
Path = C:\Java32\jdk1.8.0_20\bin;other paths should come AFTER the jdk...
4) Edit the file tools\android.bat and look for the following:
set java_exe=
call lib\find_java.bat
change this to:
set java_exe="C:\Java32\jdk1.8.0_20\bin\java.exe"
rem call lib\find_java.bat
You can also put the "#echo off" to "#echo on" at the top of the file for debugging purposes
Good luck!
I had this same problem and after trying a variety of things like changing the path variables I went to java.com on a whim and downloaded java, installed, and lo and behold the sdk manager worked after that.
Had the same problem and tried everything I browse in several forums till I found a clue, then finally solved the problem.
Basically I installed the SDK and worked ok, then my Windows Vista crashed, on restart I run SDK again but it only opened a CMD window which closed immediately.
So here's a list of useless things I did:
Went to CMD "d:/java/android/tool" and execute "android.bat", didn't work and show an pointer exception error.
Reinstalled the whole thing JDK + SDK
Changed the system path to a new folder
I traced and deleted all android occurrences on Regedit
At this point I was seriously considering start learning objetive-c was not a bad idea, finally I did this:
delete ".android" folder from "c:/users/youruser/"
delete all files within "c:/users/youruser/AppData/Local/Temp"
reinstall SDK
it WORKED !! I'm not sure though if is necessary to uninstall SDK (since I had again to download all packages & platforms) and just clear the temp folder.
Hope this helps.
I fixed this issue by reinstalling it in Program Files, it originally tried to install it in c:/Users/.../AppData/Android/....
Mine was caused by a user permission issue that running as admin didn't seem to fix (perhaps because they call batch files?).
I had the same problem, running X64 Java (1.7.0_03-b05). Even though I had both C:\Program Files\Java\jre7\bin and C:\Program Files\Java\jdk1.7.0_03\bin listed in my path, it wouldn't start - just flashed a command prompt.
The tools\lib\find_java.bat file was reporting that it was attempting to run C:\Windows\system32\java.exe but failed. Huh? I checked, and found outdated copies of java.exe, javaw.exe and javaws.exe in my C:\Windows\system32. How did those get there, I didn't put them there!
I deleted those three files from C:\Windows\system32 and the problem was fixed.
Thinking about it, the problem likely would have been fixed by making sure thatC:\Program Files\Java\jre7\bin and C:\Program Files\Java\jdk1.7.0_03\bin were at the START of my PATH variable instead of tacked onto the end.
I was experiencing the UnsatisfiedLinkError on Windows 7 64-bit after installing adt-bundle-windows-x86_64-20130717.zip:
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
The root cause was that McAfee has a feature that blocks loading DLL's from the temporary directory. This is a problem because android.bat copies a bunch of JAR and DLL files to a temporary directory and runs the program from there, to make it easy to upgrade the app in-place.
This feature can be disabled, however. You can either disable "Access Protection" altogether or only disable the feature that blocks loading DLLs from temporary folders.
I had the same issue!
I had installed the ADT bundle 64-bit, so I downloaded Java 64-bit. I messed around with paths and things, but the thing that fixed it in the end was installing Java 32-bit.
The easy fix is to install both versions. You can download them manually here.
Good luck!
When I clicked SDK Manager on Program Files or run it in cmd, nothing happened
One of your problems is Long File Names in Windows. A number of the Android tools cannot handle them. I filed a bug report on them years ago, but I can't find it at the moment. I also seem to recall something about it in the INSTALL or README.
So you should install the tools in a location without spaces. Use something like C:\Android\ or C:\Android-SDK\.
#Steve and #MeatPopsicle already mentioned spaces in the pathames, but it can't be overstated.
Actually a black cmd window appears and disappears a milliseconds.
...
Even I set path for ANDROID_SWT
Out of curiosity, where did ANDROID_SWT come from?
I know Android 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?.
So you should set the three environmental variables (after ensuring the installation directory does not contain spaces):
ANDROID_HOME
ANDROID_SDK_ROOT
ANDROID_NDK_ROOT
ANDROID_HOME is set to the directory where the hidden directory .android is.
ANDROID_SDK_ROOT is set to the directory where the SDK is installed, like C:\Android-SDK\.
ANDROID_NDK_ROOT is set to the directory where the NDK is installed, like C:\Android-NDK\. If its not installed, then don't set it.
Once you have ANDROID_SDK_ROOT set, you can put %ANDROID_SDK_ROOT%\tools and %ANDROID_SDK_ROOT%\platform-tools on PATH. Then, you can drop into a command line and issue something like this (and it just works):
adb list
What I did was:
set a new environment variable in the top user section.
VARIABLE NAME: JAVA_HOME
VARIABLE VALUE: set it to the installation directory of your most recent JDK.
For me it was, C:\Program Files\Java\jdk1.7.0_13 . Run SDK Manager as administrator at least once. I use windows 7. This method worked for me after a lot of research.
What I dont understand is when using 'where java' in the command prompt it still references C:\Windows\System32\java.exe. My SDK Manager now opens when I need it so I solved my problem.
find_java.exe doesn't seem to like the openjdk "java -version" output. I edited find_java.bat like this:
for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
set java_exe="C:\Program Files (x86)\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe"
rem ...
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
set javaw_exe="C:\Program Files (x86)\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\javaw.exe"
I'm trying to install the Android SDK on my Windows 7 x64 System.
jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation.
Is this a known issue? And is there a solution?
Press Back when you get the notification and then Next. This time it will find the JDK.
Actual SETUP:
OS: Windows 8.1
JDK file: jdk-8u11-windows-x64.exe
ADT file: installer_r23.0.2-windows.exe
Install the x64 JDK, and try the back-next option first, and then try setting JAVA_HOME like the error message says, but if that doesn't work for you either, then try this:
Do as it says, set JAVA_HOME in your environment variables, but in the path use forward slashes instead of backslashes.
Seriously.
For me it failed when JAVA_HOME was C:\Program Files\Java\jdk1.6.0_31 but worked fine when it was C:/Program Files/Java/jdk1.6.0_31 - drove me nuts!
If this is not enough, also add to the beginning of the Environment Variable Path %JAVA_HOME%;
Updated values in System Environment Variables:
JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
JRE_HOME=C:/Program Files/Java/jre8
Path=%JAVA_HOME%;C:...
I found the solution and it's beautifully stupid. I found Android SDK cannot detect JDK.
Press the Back button on the SDK error screen that tells you that the EXE couldn't detect the JDK. Then press Next.
Who would have thought that would happen?
It seems like it doesn't work without 32 bit JDK.
Just install it and be happy...
I downloaded the .zip archive instead and ran SDK Manager.exe, and it worked like a charm. You had the same issue with the .exe otherwise.
Warning: As a commenter mentioned, don't try this on a Windows 7! I tested it with Windows XP 64 bit.
As the posted solution does NOT work for all (including me, myself, and I), I want to leave a note for those seeking for another way (without registry hacking, etc.) to solve this on a Windows 64 bit system. Just add PATH (capital letters!!) to your environment Variables and set the value to your JDK-Path.
I added JDK to the existing "Path" which did not work, like it didn't with JAVA_HOME or the "Back"-Solution. Adding it to "PATH" finally did the trick.
I hope this might be helpful for somebody.
All you need are the following two registry entries. It appears as if whoever posted the other registry stuff basically just copied all the keys from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft into HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft,
which obviously isn't an ideal solution because most of the keys aren't needed.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit\1.6]
"JavaHome"="C:\\Program Files\\Java\\jdk1.6.0_23"
Non of these solutions worked for me. I fixed it by temporarily changing the filename of C:\Windows\System32\java.exe to java_.exe
None of the solutions here worked for the 64-bit version.
Putting the JDK path before the c:\windows\system32\ path in your environment variables solves the problem. Otherwise the 32-bit java.exe is found before the 64-bit JDK version.
After reading a couple of blog posts, it does seem to be even an easier fix by clicking BACK when the installer says couldn't find the JDK, and then simply click NEXT again and magically it finds the JDK. No registry messing around or re-downloading etc..
Adding JAVA_HOME environment variable (under System Variables) did the trick for me.
Clicking "Back" and "Next" buttons didn't work.
Windows 7 Professional x64, JDK 1.7.0_04 (64 bit, I don't have x86 version installed)
I think that installer tries to find JDK in specific (1.6?) version and if it can't find it, checks JAVA_HOME which was not set in my case. I have another computer (the same system but with JDK 1.6 x64) and it worked without JAVA_HOME variable.
You don't have to install 32 bit version of JDK :)
I copied the Java.exe from
C:\Windows\System32
to
C:\Windows\SysWOW64
and it worked.
I'm using 64 bit Windows 8.
Setting the JAVA_HOME environment variable to
C:\Program Files\Java\jdk1.7.0_07
instead of
C:\Program Files\Java\jdk1.7.0_07\bin
fixed it for me.
The guy above who put this: "I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path." This was in fact the correct answer.
For this SDK to install this is what I did. I am running the latest Microsoft OS Windows 8.
User Variables:
Path C:\Program Files\Java\jdk1.7.0_07\bin
Environment Variables
Create these two:
CLASSPATH %HOME_JAVA%\jre\lib
HOME_JAVA C:\Program Files\Java\jdk1.7.0_09
This one already exists so just edit:
Path At this end of WindowsPowerShell\v1.0\ simply add ";C:\Program
Files\Java\jdk1.7.0_09"
This is what I did and it worked for me. =)
This registry fix worked like a charm on my Windows 7 x64 setup: http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/
Press Report error and OK. Next will be enabled.
Try downloading and installing the zipped version rather than the .exe installer.
Also, RUN AS ADMINISTRATOR! Worked for me with backslash fix.
I had the same problem, tried all the solutions but nothing worked. The problem is with Windows 7 installed is 64 bit and all the software that you are installing should be 32 bit. Android SDK itself is 32 bit and it identifies only 32 bit JDK. So install following software.
JDK (32 bit)
Android SDK (while installing SDK, make sure install it in directory other than "C:\Program Files (x86)", more probably in other drive or in the directory where Eclipse is extracted)
Eclipse (32 bit) and finally ADT.
I tried it and all works fine.
I had the same problem and solved it by installing the x86 version of the JDK (on Windows XP x64).
I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path.
Android SDK is 32 bit app, and it requires the 32 bit of JDK to work... the 64 bit JDK won't make any use for it...
1-Simply done the "JAVA_HOME" environment variable thing.
2-Right-Click on Android SDK and from compatibletiy Tab Select windows 7 and administrator.
3-Run it again.
WORKING SOLUTION AND NO REGISTRY MODIFY NEEDED
Simply put your java bin path in front of your PATH environment.
PATH before
C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)
PATH after
C:\Program Files\Java\jdk1.6.0_18\bin;C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)
And now the Android SDK installer is working.
BTW, I'm running Win7 x64.
For installer_r21.1-windows.exe on Windows 8 x 64 what worked for me was setting up my user environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_10.
Hope this helps you all! :)
Yeah install the 32 bit version of the Java SE SDK (or any of the combinations). That should help solve your problem.
I'm running a 64-bit version of Windows 7 and I was getting this issue when attempting to install Android Studio 1.0 using the executable from:
http://developer.android.com/tools/studio/index.html
I tried all the listed solutions and several different versions of JDK 1.7 and 1.8 -- no dice. I went with installing the zipped version of the application and it worked like a charm:
http://tools.android.com/download/studio/canary/latest
Still baffled by this problem; especially since beta versions of Android Studio worked just fine.
The above methods did not work for me in Windows 8 Pro.
Just set the path to
C:\Program Files\Java\jdk1.7.0_07\
Where C is your drive in which you have installed the JDK.
Don't forget the backward slash at the end.
You will have to download the 32-bit SDK version because Win7 64-bit is not supported only Windows Server 2003 has a supported 64-bit version. During the download of Java SDK pick "Windows" as your platform and not "Windowsx64".
Once I did this android SDK installed like a charm. Hope this helps.
I tried several posted solutions and then it took a system reboot before it started working, which may have been because I had just installed the JDK. Here are all the things I had going on - not sure which ones were essential:
64-bit JDK installed.
JAVA_HOME defined using forward slashes (/) instead of backslashes
().
JDK 'bin' directory listed at beginning of PATH.
System reboot.