无法在 Android Studio 中更新到 Java 8 [英] Can't update to Java 8 in Android Studio

查看:73
本文介绍了无法在 Android Studio 中更新到 Java 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将 JDK 更新到 Java 8 时遇到问题.当我将文件夹指向 Java/jre1.8.0_73 并单击 OK 时,我再次检查它是仍然是 Java 7 文件夹.为什么会这样?这是某种错误吗?

I'v having a problem with updating JDK to Java 8. When I point the folder to Java/jre1.8.0_73 and click OK when I cehck again it's still Java 7 folder. Why does that happen? Is that a bug of some sort?

推荐答案

Java 8 在 N 之前的任何 Android 版本中均不可用,目前只是预览版 - 请在此处查看其对 Java 8 支持的详细信息(甚至 N 也不支持所有 Java 8 功能):https://developer.android.com/preview/j8-jack.html

Java 8 isn't available in any version of Android prior to N, which is currently just a preview - see the details of its support for Java 8 here (even N doesn't support every Java 8 feature): https://developer.android.com/preview/j8-jack.html

请记住,Android 只是使用标准的 Java 虚拟机.它使用自己的虚拟机(4.4 及更早版本中的 Dalvik;Android Runtime - ART - 在 4.4 中作为预览提供,后来成为默认虚拟机)并拥有自己的字节码格式:https://source.android.com/devices/tech/dalvik/dex-format.html

Keep in mind that Android is not just using the standard Java virtual machine. It uses its own virtual machine (Dalvik in 4.4 and earlier versions; Android Runtime - ART - is available as a preview in 4.4 and later became the default virtual machine) and has its own bytecode format: https://source.android.com/devices/tech/dalvik/dex-format.html

这篇关于无法在 Android Studio 中更新到 Java 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆