本文介绍了Android Studio 3是否支持Java 9进行Android开发?如果是这样,则支持Java 9的哪些功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将安装Android Studio 3以开发Android应用程序.

我想知道是否可以将Java 9用于Android开发吗?如果可以,它是否支持Java 9的所有功能?

解决方案

据我所知,IDE本身支持Java9.这意味着您可以编写Java 9桌面程序,或使用JDK 9运行IDE./p>

但是,Android本身还不支持Java 9.尽管我已经看到一些有关Android Studio和Java 9的问题的问题,但是您仍然可以下载JDK9.就我个人而言,我拥有Java 9,并且Android Studio的运行没有问题.

Android SDK是您将要处理的开发工具包,并且具有源兼容性,根据您的设置,您将获得类似于Java 6、7或8的语言功能.因此,您可以下载JDK 9并最可能使用它而不会出现问题,但是您不能在任何Android应用程序中使用任何语言功能.

关于JDK和Android SDK之间的差异,您应该阅读此书. Android当前支持Java 8功能的子集,但并非全部.即使以后它支持Java 9或更高版本的某些部分,它也可能永远无法支持所有功能,或者遗漏Java 8的某些部分.

I'm going to install Android Studio 3 in order to develop an Android application.

I'd like to know if it is possible to use Java 9 for Android development? If so, does it support all of the Java 9 features?

解决方案

As far as I know, the IDE itself supports Java 9. This means you can write a Java 9 desktop program, or run the IDE with JDK 9.

However, Android itself does not support Java 9 (yet). You can still download JDK 9, although I have seen some questions on problems related to Android Studio and Java 9. Personally, I have Java 9 and Android Studio runs without problems.

The Android SDK is the development kit you'll be dealing with, and with source compatibility you'll get language features similar to Java 6, 7, or 8, depending on your settings. So you can download JDK 9 and use that most likely without issues, but you can't use any of the language features in any Android apps.

As for differences between the JDK and the Android SDK, you should read this. Android currently supports a subset of Java 8 features, but not everything. It might never support everything, or leave out some parts of Java 8, even if it later supports some parts on Java 9 or higher.

这篇关于Android Studio 3是否支持Java 9进行Android开发?如果是这样,则支持Java 9的哪些功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 17:13