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.
You must install Oracle JDK before installing Android Studio, so please don't start this step until you have completed Step 1 above. Download Android Studio from the following address: Android Studio Download Page.
We learned how to download, install and setup Android Studio in a Windows OS. We used the Windows 10 OS, But it will work any other flavors of windows like Windows 7 or Windows 8.
If it is not, please try to install x86 (32 bit) JDK. If it is x64 (64 bit) then, try to run with "Run as administrator" option by right clicking it. If it is not working either way, then please check the system log from Control Panel -> Administrative Tools -> Event Viewer and see what is going around on installation.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With