will android java support lambda expression in java 8? [closed] will android java support lambda expression in java 8? [closed] android android

will android java support lambda expression in java 8? [closed]


Android doesn't use Oracle's Java SE versions, it's based on parts of the Apache Harmony project so it doesn't even support Java 7. Harmony is not actively developed any more and won't support 1.7.

Unless Google decides to upgrade Harmony and the Android SDK to a newer Java version, there won't be any Java 7 or Java 8 features in Android - even if new features are just syntactical. They could use an alternative implementation like the OpenJDK, though I don't know of any plans for this. Some people think the use of OpenJDK is unlikely because of lawsuits between Google and Oracle.


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

Google has to implement those features by their own effort and it seems that the choose to do so mostly for more popular features.