[英]What is the latest Java SDK that can be used for Android app development?
I recently bought a new MacBook.我最近买了一台新的 MacBook。 I installed the Android SDK and Studio and then I imported my project.
我安装了 Android SDK 和 Studio,然后导入了我的项目。 AS suggested to use the bundled Open JDK for my project.
AS 建议为我的项目使用捆绑的 Open JDK。 I accepted and I am able to build and run my project via AS.
我接受了,并且能够通过 AS 构建和运行我的项目。
The problem is, my command line doesn't work :(问题是,我的命令行不起作用:(
==> ./gradlew clean
No Java runtime present, requesting install.
After running the above code the following alert displays.运行上述代码后,将显示以下警报。 This web page will be open when I click on the
More Info
button.当我单击“
More Info
按钮时,将打开 此网页。
After I searched I realized that I have to have JDK installed on my laptop.在我搜索之后,我意识到我必须在我的笔记本电脑上安装 JDK。 I remember -from thousand years ago- that I have to have JDK 8 on my laptop.
我记得 - 从一千年前 - 我的笔记本电脑上必须安装 JDK 8。 I also heard that android projects work with JDK 11.
我还听说 android 项目适用于 JDK 11。
It looks like the latest JDK is 15. So, what should I do?最新的JDK好像是15,那怎么办呢? What is the latest JDK that can be used for Android app development?
可用于 Android 应用程序开发的最新 JDK 是什么?
Anything Java 8 or above is fine.任何 Java 8 或更高版本都可以。
Find path to JDK in File > Project Structure, Tab SDK Location > JDK Location.在 File > Project Structure,Tab SDK Location > JDK Location 中找到 JDK 的路径。
In MacOS, installed Virtual Machines are normally placed in /Library/Java/JavaVirtualMachines/*
在 MacOS 中,安装的虚拟机通常放在
/Library/Java/JavaVirtualMachines/*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.