androidstudio 设置 java 1.7 版 [英] androidstudio set java version 1.7
问题描述
我正在尝试在 android studio 中使用 java 1.7 版,但不幸的是它无法正常工作...如果在File->Other settings->设置版本默认项目结构
到
I'm trying to use java version 1.7 with android studio but unfortunately it is not working properly...
If set the version in File->Other settings -> Default project structure
to
Project SDK:
java version 1.7.0_06
Project language level:
7.0 Diamonds, ARM, multi-catch
但是当我使用带有字符串的 switch 语句时,我得到一个错误,这在 java 1.7 中应该是可能的,所以我需要设置任何其他设置吗?
But when I use a switch-statement with a string I get an error which should be possible in java 1.7, so do I need to set any other settings?
推荐答案
不...没有要更改的设置.Android SDK 不支持完整的 java 7 语法,所以你不能使用它.
No... there is no settings to change. Android SDK don't support full java 7 syntax, so you can't use it.
请注意,最新的 android 版本支持 java.nio.*(java 7 API 中的新功能).
Note that java.nio.* (new in java 7 API) is supported by latest android version.
这篇关于androidstudio 设置 java 1.7 版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!