简体   繁体   English

可用于 Android 应用程序开发的最新 Java SDK 是什么?

[英]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按钮时,将打开 此网页

安装java命令行工具

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.

相关问题 Java 5可以使用的最新JGroups版本是什么? - What is the latest JGroups version that can be used with Java 5? Android SDK(Android开发工具)是否会更改Java SDK? - Does Android SDK (Android Development Tools ) alter the Java SDK? 最新版本的Geofire for Java(2.1.1)是否可以与最新的Firebase android sdk一起使用? - Will latest version of geofire for java (2.1.1) work with latest Firebase android sdk? 关于 android 开发中使用的 java 语法的问题 - Question regarding java syntax used in android development 在意图使用 java 语言开发 android 应用程序。 错误是无法使用 getContext() - in intent in android app development using java language. error is getContext() could not be used Android开发:如何在不使用应用程序时运行线程 - Android Development: How can I run a thread while the app is not being used 是否可以从外部 flash 驱动器运行 java (jdk-windows)、Eclipse (indigo) 和 Android-sdk FOR android 应用程序开发 - Is it possible to run java (jdk-windows) , Eclipse (indigo) and Android-sdk FOR android app development from external flash drive 移动应用开发SDK - mobile app development SDK 没有SDK的Android开发 - Android development without SDK Android Studio,Core Java中的离子应用程序开发 - Ionic app development in Android Studio, Core Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM