Android Studio: How to modify the JDK version and know the Java version used


Get the Java version used

The meaning of JDK:
JDK代表Java Development Kit(Java开发工具包),它是一种用于开发和构建Java应用程序的软件包。JDK包含了开发Java应用程序所需的工具、编译器(javac)、运行时环境(JRE)以及其他辅助工具和库。

In the field of Java development, JDK version and Java version usually correspond to each other. For example: JDK 8 represents the version of Java 8.

You can know the Java version used based on the JDK version you view later.


Android Studio View JDK Version

File——Project Structure——SDK Location——gradle settings. In this interface, you can see the JDK version you are using. As can be seen from the picture, I am using Java 20 configured in the environment variables.

From here you can also adjust the Java version you use to match the Java and gradle versions in the project.
Insert image description here


Links to further deepen your understanding:
One article to thoroughly understand the confusing version naming of Java and JDK!


This is the end

Guess you like

Origin blog.csdn.net/Aer_7z/article/details/132219976