On Wed, Mar 5, 2014 at 9:34 PM, Cristian C. <[email protected]> wrote:
> You can actually use Java 8 on Android. Take a look at the retrolambda > project: https://github.com/orfjackal/retrolambda > No, you can't. What this library does is rewrite the bytecode from instructing the runtime to create a lambda (which currently uses anonymous inner-classes as an implementation detail) to actually creating anonymous inner-classes directly in your code. It's essentially syntactic sugar that is fixed at the byte-code level instead of at the compiler level (which is how the Java 7 "backported" features are currently implemented). > I also suggest using IntelliJ instead of Android Studio. It's tricky to > configure AS to make it work with Java 8. So far I have tested lambdas, > diamons, method references, streams, etc. and they seem to run just fine. > For the JVM it supports them, yes. You cannot use features which are not syntactic sugar on Android. -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
