I have Android Studio 1.1 on a Windows 8.1 machine.
There are several JDKs installed on my machine (1.6, 1.7, 1.8) and Android studio uses 1.8 (I can see that in the about popup).
I want to change the JVM used for running Android Studio to 1.7, since I have some performance problems and I suspect it has to do something with using JRE 1.8.
What is the proper way to do that?
Set the JDK version Open your project in Android Studio and select File > Settings... > Build, Execution, Deployment > Build Tools > Gradle (Android Studio > Preferences... > Build, Execution, Deployment > Build Tools > Gradle on a Mac). Under Gradle JDK, choose the Embedded JDK option. Click OK.
Android Studio is a customized version of JetBrains' IntelliJ IDE, which is, in turn, a Java application. Therefore, as we established, to launch IntelliJ (and, consequently, Android Studio) on your computer, you need to have JRE installed.
As per the docs, JDK 17 isn't supported yet in Android Studio.
Android Studio supports all the same programming languages of IntelliJ (and CLion) e.g. Java, C++, and more with extensions, such as Go; and Android Studio 3.0 or later supports Kotlin and "all Java 7 language features and a subset of Java 8 language features that vary by platform version." External projects backport ...
This answer here solves your problem:
https://stackoverflow.com/a/27999642/4114992
In particular, the start script states:
# ---------------------------------------------------------------------
# Locate a JDK installation directory which will be used to run the IDE.
# Try (in order): STUDIO_JDK, JDK_HOME, JAVA_HOME, "java" in PATH
# ---------------------------------------------------------------------
So, if you set STUDIO_JDK
as an environment variable, to, say, 1.7, you should be able to override the JRE used by Android Studio itself.
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