3 ms·
thought recent android's tools update meant I can use java8 on android devices... guess that requires a recent android device :(
by devdoomari 9y ago
thought recent android's tools update meant I can use java8 on android devices...
guess that requires a recent android device :(
- pjmlp 9y agoThe amount of supported features depends on the target API of the application.
- izacus 9y agoThe devices themselves still run a JVM (Dalvik and ART) that's basically compatible only with ~JRE7 bytecode. There are some new features in ART since N, but still the JVM isn't fully Java 8 compatible (afaik invoke-dynamic for lambdas is still not supported). So the Java 8 tools you're talking about essentially take Java 8 compiled bytecode and patch out the parts that aren't compatible with device JVM (e.g. they replace lambda invocations with anonymous classes like you'd use on Java 6 etc.). This doesn't work for things like Scala which use these new features in patterns those tools can't patch/recognise.