Jump to content

Hi,

 

I installed Android studio and I am having problems running the application.

I have installed JDK 1.7, set JAVA_HOME to the appropriate directory, and have restarted my computer multiple times as well as installing the consumer version of JAVA.

How can I resolve this?

 

Thanks...

temp.PNG

Link to comment
https://linustechtips.com/topic/653544-error-launching-android-studio/
Share on other sites

Link to post
Share on other sites

I think android studio comes packaged with its own JDK (at least the github distro does). What's the problem you're seeing exactly? Have you already installed the android SDKs through the android SDK manager?

 

If you're trying to set a JDK, you can add them through android studio.Clipboard-1.png

Link to post
Share on other sites

1 hour ago, Tirant said:

I think android studio comes packaged with its own JDK (at least the github distro does). What's the problem you're seeing exactly? Have you already installed the android SDKs through the android SDK manager?

 

If you're trying to set a JDK, you can add them through android studio.Clipboard-1.png

Hi.

I cannot even run the program to set the JDK location. And I downloaded the program through https://developer.android.com/studio/index.html , with all of the items being installed. I also have JAVA_HOME set to C:\Program Files (x86)\Java\jdk1.8.0_101 . 

temp.PNG

temp.PNG

Link to post
Share on other sites

1 hour ago, Tirant said:

Are you getting any error messages? I cannot see your screenshots. Check the error logs (google where they are). Android studio will use a different JDK than the one you added to your path.

The error that I receive whilst attempting to run the Android Studio program is "No JVM installation found. Please install a 64-bit JDK. If you already have a JDK installed, define a JAVA_HOME variable" (Which I have done)

Link to post
Share on other sites

How are you setting JAVA_HOME? If you open cmd and type echo %JAVA_HOME%, what shows up? Also, you may need to restart your PC (or log out and back in) to refresh env vars. Also keep in mind, paths with spaces need to be quoted

 

This is what my env vars look like in Win 10:

JAVA_HOME=C:\java\jdk8

JRE_HOME=%JAVA_HOME%\jre

Link to post
Share on other sites

58 minutes ago, Tirant said:

How are you setting JAVA_HOME? If you open cmd and type echo %JAVA_HOME%, what shows up? Also, you may need to restart your PC (or log out and back in) to refresh env vars. Also keep in mind, paths with spaces need to be quoted

 

This is what my env vars look like in Win 10:

JAVA_HOME=C:\java\jdk8

JRE_HOME=%JAVA_HOME%\jre

I placed quotation marks around the destination for JAVA_HOME, and added the location of JRE_HOME to the jre directory inside the JAVA_HOME destination, and now when attempting to open Android Studio, it claims "The environment variable JAVA_HOME (with th value of "C:\Program Files (x86)\Java\jdk1.8.0_101") does not point to a valid JVM installation."

 

Thanks,

Link to post
Share on other sites

44 minutes ago, Slinky0 said:

I placed quotation marks around the destination for JAVA_HOME, and added the location of JRE_HOME to the jre directory inside the JAVA_HOME destination, and now when attempting to open Android Studio, it claims "The environment variable JAVA_HOME (with th value of "C:\Program Files (x86)\Java\jdk1.8.0_101") does not point to a valid JVM installation."

 

Thanks,

 

1 hour ago, Tirant said:

How are you setting JAVA_HOME? If you open cmd and type echo %JAVA_HOME%, what shows up? Also, you may need to restart your PC (or log out and back in) to refresh env vars. Also keep in mind, paths with spaces need to be quoted

 

This is what my env vars look like in Win 10:

JAVA_HOME=C:\java\jdk8

JRE_HOME=%JAVA_HOME%\jre

I actually reinstalled java in a different place (C:\Java\) and it has reverted to the old error message.

Link to post
Share on other sites

wait...

question, did you mess with the vars?

if so then just reset them back to defults

AS expects it to be defult and nothing else

 

****SORRY FOR MY ENGLISH IT'S REALLY TERRIBLE*****

Been married to my wife for 3 years now! Yay!

Link to post
Share on other sites

Wait, you are sure that you have correct bitnesses of Android Studio and java right? They both should be the same (64-bit).

 

Here's what I would do, make sure java is installed, preferable with a path without spaces (e.g., C:\java). Set the environment variables like how I told you earlier. Add %JAVA_HOME%\bin to your PATH. Now when you log out and back in or restart your machine, you should be able to open cmd and type java -version and get something like:

 

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

 

Once you have done this, you have verified that java is installed and working, and that JAVA_HOME is set correctly. If everything works correctly, try Android Studio again, and if it still doesn't work, you can try installing IntelliJ and using Android Studio as a plugin until you get this fixed.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×