9
android SDK 的 Java 版本支持
source link: https://www.v2ex.com/t/820597
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
想问下 android SDK 的 Java 版本支持,查了一下开发者指南好像目前只支持最高 java1.8. 但是我想用 java15,主要是因为 15 支持文本块,因为项目里有大量的 sql 语句,文本块更好看也更好改.
于是我把 sourceCompatibility 和 targetCompatibility 都改成 Java_15,发现竟然就 OK 了,编译运行也没问题,使用 15 语法也没问题,
有点懵逼,很好奇,Android SDK 的 Java 版本支持到底在哪里查,还是 Java 高版本可以向下兼容,有没有大佬帮我解答一下疑惑
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK