Android Studio installation on Windows 7 fails, no JDK found - android

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.

Related

why is not the computer sensible to the JDK [duplicate]

I have downloaded JDK 7 and Eclipse Helios, but when I open Eclipse, I get the following error
A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order
to run Eclipse. No Java virtual machine was found after searching the following locations:
C:\eclipse\jre\javaw.exe javaw.exe in your current PATH
I have tried to put the exact path of JDK bin folder in eclipse.ini file but it didn't work
-vm
C:\Program Files\Java\jdk1.7.0_05\bin
Can somebody tell me what is the reason behind this issue and how can I solve it.
When I had this problem, I solved the following way (I have Windows 7):
Right click on the Eclipse icon in your desktop.
Properties
Target: C:\eclipse\eclipse.exe -vm C:\Java\jdk1.6.0_32\jre\bin\javaw.exe
3a (if your jdk is installed in a path like "Program Files"): C:\eclipse\eclipse.exe -vm "C:\Java\jdk1.6.0_32\jre\bin\javaw.exe"
In your eclipse.ini file you need to specify the path to the Jave executable, not just the bin directory, as described in the Eclipse wiki. For example, like this:
-vm
C:\Program Files\Java\jdk1.7.0_05\bin\javaw.exe
Set environment variable Path.
Path=C:\Program Files\Java\jdk1.7.0_05\bin
It might be because you haven't downloaded Oracle... I had the same issue.
I think that eclipse needs to read the file Java, but it does not know where it is located. I normally specify the PATH variable when I install a Java SDK. I think you need to to this, too since it complains about "your current PATH".
Oracle tells you how to do this:
http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
Windows 7
From the desktop, right click the Computer icon.
Choose Properties from the context menu.
Click the Advanced system settings link.
Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
C:\Program Files\Java
I ran into the same problem today after installing eclipse on a new PC with an up-to-date 64-bit JRE (on Windows 7 x64). Ajusting the PATH Variable as suggested resulted in the JNI file not found error.
The problem was that I was using a 32-bit eclipse with a 64-bit java runtime. On another computer there was an old 32-bit JRE installed, so the 32-bit eclipse was working. After uninstalling the 32-bit JRE, eclipse stopped working with the same error as above.
What I learned from this:
Even though java is cross platform, there still is a difference between 32 and 64 bit versions
Java JRE and the eclipse version have to match (32 or 64 bit) to run properly
Consequently, it might be necessary to install both - the 32 and 64 bit JRE, depending on the software used
When updating Java, one always has to update both versions of JRE
Adding the JRE folder to the PATH is not necessary, it doesn't fix the problem
Yeah,
Even i faced the same problem and found out a solution.
First check whether you have installed Java Jdk . If yes then proceed....
Then go to C:\ then Program Files and look for java and in there you will find a Jdk file open it then copy the bin file and go to your adt-bundle-windows-x86_64 and place the bin file under Eclipse . Hope this works for you and happy developing ;)
Because Eclipse and JDK "installing time" is very short. I think a clean solution will save your time.
1/ The first, JDK and Eclipse should be the same "bit" (Eclipse 32 bit go with JDK 32bit, and 64 bit so on). I think nowaday computers with large memory and modern 64 bit OS should choose the 64 bit pair.
2/ Remove all JDK version in your PC, check if its done by: Open CMD, type "java" and enter, if there is no application run, you done.
3/ Install JDK (assume JDK 8 64 bit)
4/ Download the rights version of Eclipse (zip)(assumse you download 64 bit version)
5/ Just extract eclipse and run it.
Eclipse is just a portable software which packaged in a zip, don't waste your time to fix a wrong installation.
Hope this help.
E-Riz's comment worked for me, I just had to make sure I put the command at the top of the ini file.
Inside the eclipse directory you will have an eclipse.ini, at the very top of the ini file past the directory path
-vm
C:\.....\Java\jdk1.7.0_05\bin\javaw.exe
You don't need to edit any path. Here is what you do.
Open the Eclipse folder
Search "javaw" in the search.
Copy "javaw" and paste it into the folder.
Open Eclipse.
Enjoy!
I don't know why you guys keep talking about the path. It has nothing to do with it. The dialogue box said is was only searching that folder for the javaw program.

android studio AUTOMATICALLY closes

I installed android studio in windows 7 but it just closes immediately after opening. I've installed java jdk also and added a JDK_HOME environment variable But android studio closes itself after few seconds.
Figured it out! I'm sure someone will run into this in the future, so here goes.
Even though it found my JDK during installation, it wasn't able to find it when I was trying to open it, for some reason. Simple fix. Add a JDK_HOME environment variable to your system variables. It should contain the path to your JDK's ROOT directory. i.e. c:\Program Files\Java\jdk1.7.0_21\
source link
Answer-2
see this link also link2
I have two versions of JDK installed on my computer and get the same problem.
x64: C:\Program Files\Java\jdk1.8.0_91
x86: C:\Program Files (x86)\Java\jdk1.7.0_55
Solved by pointing the JDK_HOME to x86 path.
For me it was changing the gradle version which caused this because of a known bug, I commented here on what worked for me but I recommend you read through the whole thing
https://github.com/ConsensusJ/consensusj/issues/7

Gradle in Android Studio giving error Project sync failed

I am new to Android Studio.I installed Android Studio-1.2.1.1 and i have jdk1.7.0_40 installed.I am facing problem with gradle build.
For reference you can check gradle issue
I am getting following error in messages
Error:The newly created daemon process has a different context than expected.
Java home is different.
Expecting: 'C:\Program Files\Java\jdk1.7.0_40' but was: 'C:\Program Files\Java\jdk1.7.0_40\jre'.
Please configure the JDK to match the expected one.
Open JDK Settings
All i understood is gradle is using JRE and Android Studio is using JDK and due to that two JAVA_HOME's are different and giving errors.
I tried downloading gradle 2.3 and changed gradle path in android studio to this file,still same problem.
This is a very late answer but I see that a common suggestion is to remove all other jdk's and this is not always the best idea. You might need older jdk's for different projects. You can go into the gradle.properties file for the project and enter the following line (varied based on your version):
org.gradle.java.home=C:/Java/jdk1.8.0_111
If you are using a different jdk just point to a different directory.
Replace this
C:\Program Files\Java\jdk1.7.0_40\jre
with
C:\Program Files\Java\jdk1.7.0_40
inside your JAVA_HOME variable
EDIT:
I fixed this issue by uninstalling all the jdk installation & updates
then reinstall only one jdk and assure its env. variables
I do not have a solution but I have the same problem
it happens as the android studio opens from java_home/jre thence all JVMs that will fork next will come from this path, while your system varible tells Gradle to get his java.exe from JAVA_HOME
I tried to make gradle read from jre but it falied also i tried to make android studio open from java_home/bin but it falid also
For those who are on OS X El Capitan (v10.10) and end up with the above error message.
In my case there was nothing wrong with Gradle, simply my Java 1.8 was "too new" for Android Studio 1.5 so I had to install older 1.7.
I downloaded it from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
(jdk-7u79-macosx-x64.dmg)
After all I had to just update JDK location in the project structure
I already had java jdk 7u17 and I also had got same error as FaizAli.
I try to search and done a lot of changes but not success!
Then, I downloaded jdk 7u80 at this link and installed this jdk.
After that those error gone.
I solved it by going to Project Structure then unchecking use embedded JDK and then setting the path to C:\Program Files\Java\jdk1.8.0_121
What I found out in my case is that the SDK my project pointed to "broke" and I had to fix its "JDK home path":
This is 2019.
For anyone experiencing this issue...
The first thing is to make sure that you correctly set your environment variables as per this instruction: https://www.mkyong.com/java/how-to-set-java_home-on-windows-10/
Which means you should be able to type javac -version and java -version and get the version number inside your Home directory.
Once you can confirm this, then go to the Project Structure inside, the SDK Location > JDK Location select Use JAVA_HOME environment variable.
This was what I did and it worked.
Solved this by going to
File -> Project Structure -> SDK Location
and under JDK Location, update with Gradle SDK location.
This happens because Android is using embedded ( JRE ) which is selected as recommended and at same time Android Studio detects JDK Home_Path (Environmental Variable ) and due to that two JAVA Path are different there is the conflict so it give you Error :
If You remove java_home path or Environmental variable you will get this error:
CreateProcess error=2, The system cannot find the file specified [Android studio
For Android Studio, the solution is to go to File> Other Setting > Default Project Structure> Uncheck the checkbox
and browse and set JDK path

Failed to complete Gradle execution (new project) - java home different

I downloaded Android Studio version [build 135.1653844] and created a new project. I am getting an error:
Failed to complete Gradle execution.
Cause:
The newly created daemon process has a different context than expected.
It won't be possible to reconnect to this daemon.
Context mismatch: Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.6.0_45,daemonRegistryDir=C:\Users\gargn\.gradle\daemon,pid=1000,idleTimeout=null,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=9a6c3945-1d55-46d7-897b-4ed84a5707bb,javaHome=C:\Program Files\Java\jdk1.6.0_45\jre,daemonRegistryDir=C:\Users\gargn\.gradle\daemon,pid=1664,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
My Java home is set to C:\Program Files\Java\jdk1.6.0_45 and I could not find any setting where I am using the jre path. I searched in all text files and could not find jre path as shown in the error above.
Though I did not find the root cause where the different javaHomes have been taken from, at least I found a workaround that worked for me:
Try setting the following in your gradle.properties (either in %USERPROFILE%\.gradle\ or in your project build dir):
org.gradle.java.home=C:\Program Files\Java\jdk1.6.0_45\jre
I deleted the jre from the installation file of inttellij, but when I tried to run intellij, i said that I tried to run a 32bit version of intellij, but no jre for 32bit was found, then I when to the intellij installation directory and run a 64bit version, and the problem was solved.
Another answer for people looking for a solution:
In my case, I did not have any 32 bit JVMs installed, so I ran IntelliJ in 64 bit mode instead, and everything worked fine after I set my IDEA_JVM_64 environment variable.
Bit Late,But will be helpful for someone,
For me the problem was solved by uninstalling all jdks and installing only one and setting JAVA_HOME for that jdk in my case
JAVA_HOME
C:\Program Files\Java\jdk1.7.0_40
Thats All
This error appear most likely downloading applications (such as Oracle, Application servers...) that include java version or installing another JDK/JRE.
I managed to solve the this problem by deleting/renaming all JDK/JRE and forders and only keep one and only one JDK folder and contains JRE folder inside.
also I put the JDK path into JAVA_HOME and path vatiables and remove any other JDK/JRE paths from the environment variables.
After that reset the JDK home in your IDE.
Regards,
Mohammed Kharma
I managed to solve this problem by renaming Info.plist and version.plist to Info.plist.old and version.plist.old in /Applications/IntelliJ IDEA.app/Contents/jre/jdk/Contents folder on Mac.
Executed
mv Info.plist Info.plist.old | mv version.plist version.plist.old
in folder mentioned above. Then I just run Intellij and things were working fine. Probably, it would be possible to fix this by renaming only one of these files but I haven't tested it. After fixing it I haven't rename files back to Info.plist and version.plist. Should I?
After this fix, I also created idea.properties file in ~/Library/Preferences/IntelliJIdea2016.2 and added line gradle.java.home=$(/usr/libexec/java_home)

Android Studio doesn't launch: Could not find or load main class com.intellij.idea.Main

Being new in Android devopmnet, I have been using Android Studio for development, but suddenly it doesn't work anymore.
The program doesn't launch anymore, and If I execute the studio.bat from Command Prompt, I get the following error:
Error: Could not find or load main class com.intellij.idea.Main
I have seen other posts about Android Studio not launching (e.g. this and this), but neither of them solve my problem. I have set PATH variables for both JAVA_HOME and JDK_HOME correctly to C:\Program Files\Java\jdk1.7.0_07
As I have mentioned, Android Studio used to work and I don't have any idea why it has stopped working. Any clue?
For android studio 1.3.1
go to environment variable and create new variable and give it a name JAVA_HOME and in path use this C:\Progra~1\Java\jdk1.7.0_71.
I hope that can help you.
if you have just used copy paste of exe file it will show this message so go in Program Files\Android\Android Studio\bin and click on exe file.
I had the same issue after updating the Android studio. I was not able to launch it from click on Android Studio icon and after running ./studio.sh it was giving me same error
I follow the below step and solved the problem.
I downloaded the studio and install it in the new directory.
After installation success, copy all the files & folders and paste and replace it into old location where studio was installed.
Having JAVA_HOME set to point latest JDK version (C:\Program Files\Java\jdk1.7.0_79) will make the Android studio work. Make sure the path is correct. Seems that JDK_HOME is not needed.
can refer Installing Android Studio (Not working)
If you have recently uninstalled and reinstalled Android Studio and had previously pinned the Android Studio icon to your Task Bar or Start Menu, it may be that this icon no longer looks for the new installation.
Delete it and re-pin it and all will be fine.
I faced the same issue while launching the studio.exe file. The actual problem was I have downloaded the 64-bit version of Android studio. But my computer supports only 32 bit.
So I downloaded 32-bit version and installed.
Now it is working fine.
Well after searching allover the web, failed to get solution till i decided to reinstall android studio. same folder changed nothing didn't delete anything just reinstalled and boom works as before
This happens when you update Studio and new version is installed and previous one is in process of deletion: at the main time if PC shut down or suddenly crashed due to power cut etc. Then this problem will appear:
could not find main class com/intellij/idea/main
Solution:
Go to this path "C:\Program Files\Android", there you will find two Android Studio Folders.
Find which one is latest: (Latest name wold be "Android Studio1") && (Old version would be Android Studio)
Delete old one(if you don't need it any more) and launch latest exe on this path:
C:\Program Files\Android\Android Studio1\bin
Open the Installer and download it again and you can select delete previous versions to clear confusion.
Open studio64 instead of studio
I found Answer: you just make wrong shortcut(just ctrl+C ctrl+v) for launchfile(exe). You must make shortcut following this method:
Right mouse click and select make shortcut menu.
Please follow the below steps,
Go to My Computer -> Properties -> Advance System Settings
System properties window will appear
Go to Advance tab -> Environment Variables -> New
Add or update JAVA_HOME path as expected.
Optionally you can also add or update JDK_HOME if you have JDK installed in your PC

Categories

Resources