Java 8 + Android

3

Is it possible to use the full potential of the Java 8 API (lambda queries and etc) on Android systems?

If yes, is it worth the migration already?

    
asked by anonymous 29.03.2014 / 11:48

3 answers

2

No.

Android does not use Oracle's JDK, nor is it exactly a port of it. So no, there's no way to use "Java 8" on Android. Keep in mind that the majority of JDK7 features were only now supported on Android (4.4).

As mentioned by luiscubal, what you can do is use certain features of Java 8 in your Android application, using retrolambda, for example.

If one day we will have these features built into Android, only time will tell. For now, there are no public plans for such.

    
31.03.2014 / 14:48
1

I think so, but I do not recommend doing this because there are still many users who should still be using Java 7. It's always good to keep your app working in both the current and the older version of Java.

    
30.03.2014 / 07:40
1

No.

This is because Android does not use the Oracle JDK, official, as already said. But as far as I know, it uses the Apache Harmony class library and also implements a completely different execution environment than the traditional Java runtime environment: DVM is a virtual machine that does not even follow the Sun / Oracle specification for Java virtual machines .

The entire Android universe does not follow the evolution of traditional Java, so Android does not have or may never have the latest Java 8 news.

    
22.04.2014 / 01:13