When will default methods (Java 8) be supported in Android?

I was wondering if I can use default methods in interfaces in Android development. This feature is included in Java 8, but I found that Android Java VM doesn't support it yet. Is there any way to use default methods in Android development? If not, when will this feature be available, is there some kind of timeline for these features?

+3


source to share


2 answers


On accessibility: I think we will see default methods in Android N. There are already a lot of tests related to the default methods for the new Jack compiler on AOSP. See http://bit.ly/1PZoV1A

And today the java.util.function package has been merged with the ojluni wizard (including default methods and using lambdas).



Edit: here is the official confirmation that Android N will support Java 8: http://developer.android.com/preview/j8-jack.html Streams are still missing, but java.util.Spliterator (s) was enabled yesterday ... Given the current pace, I expect to see the Stream API in May.

+6


source


Possible duplicate: Will there be jambda javas support javascript support in java 8?

In a possible duplicate question, kapep answered this (read the full answer for more information):



Android doesn't use Oracle Java SE versions based on parts of the Apache Harmony project, so it doesn't even support Java 7. Harmony is not actively evolving or supporting 1.7.

So I think you can forget about the new features of the Android Java development version of Oracle and follow the Android API (not Oracle).

+2


source







All Articles