Will android java support lambda expressions in java 8?

I understand that "java" in dalvik vm is different from Java se in terms of API and architecture, etc. But the syntax has always been the same. (Please correct me if I am wrong)

Now support for lambda expression in java 8 will be released, will android java follow it? made a google or aosp promise to make dalvik according to java se?

UPDATE: Now, as with Android 4.4 Kit Kat (API 19), the Java 7 syntax has been OFFICIALLY supported. Source from android.com

+56
java android java-8 dalvik
Feb 11 '13 at 18:20
source share
1 answer

Android does not use Oracle Java SE versions, based on parts of the Apache Harmony project , so it does not even support Java 7. Harmony is not actively developing anymore and will not support 1.7.

Unless Google decides to upgrade the Harmony and Android SDK to a new version of Java, Android will not have any Java 7 or Java 8 features, even if the new features are simply syntactic. They can use an alternative implementation such as OpenJDK, although I do not know any plans for this. Some people feel that using OpenJDK is unlikely due to lawsuits between Google and Oracle.




Some of the features of Java 7 , the most notable: diamond operators, multi-user mode, a string switch and in Android N are also some of the features of Java 8 , since lambda expressions were implemented in Android since this answer was written. (Thanks to Ross and Stefan for mentioning this in the comments).

Google needs to implement these features on its own, and it seems that they prefer to do this mainly for more popular features.

+32
Feb 11 '13 at 19:45
source share



All Articles