Java 8 + Android

Asked

Viewed 250 times

3

You can use the full potential of the Java 8 API (lambda queries and etc) on Android systems?

If yes, it’s worth the migration?

  • The retrolambda project is a good starting point, but does not include the entire Java 8 API.

3 answers

2


Not.

Android does not use Oracle’s JDK, nor is it exactly a port of it. Therefore, no, there is no way to use "Java 8" on Android. Remember that the majority of JDK7’s Features were only now supported on Android (4.4).

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

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

1

Not.

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

The entire universe of Android does not follow the evolution of traditional Java, therefore, Android does not have yet or maybe never have the news of Java 8.

1

I think so, but I do not recommend doing this, because there are still many users who must still be using Java 7. It is always good to keep your app working on the current and previous version of Java.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.