HiveBrain v1.2.0
Get Started
← Back to all entries
patternjavaCritical

Is it possible to use Java 8 for Android development?

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
possiblejavaandroidusefordevelopment

Problem

Searching the web, it is not clear if Java 8 is supported for Android development or not.

Before I download/setup Java 8, can some one point me at any "official" documentation that says Java 8 is or is not supported for Android development.

Solution

java 8

Android supports all Java 7 language features and a subset of Java 8 language features that vary by platform version.

To check which features of java 8 are supported

Use Java 8 language features


We've decided to add support for Java 8 language features directly into the current javac and dx set of tools, and deprecate the Jack toolchain. With this new direction, existing tools and plugins dependent on the Java class file format should continue to work. Moving forward, Java 8 language features will be natively supported by the Android build system. We're aiming to launch this as part of Android Studio in the coming weeks, and we wanted to share this decision early with you.

Future of Java 8 Language Feature Support on Android

Eclipse Users:

For old developers who prefer Eclipse, google stops support Eclipse Android Developer tools

if you installed Java 8 JDK, then give it a try, if any problems appears try to set the compiler as 1.6 in Eclipse from window menu → Preferences → Java → Compiler.
Java 7 will works too:

Java -> Compiler">


Java 7 or higher is required if you are targeting Android 5.0 and
higher.

install multiple JDK and try.

Context

Stack Overflow Q#23318109, score: 196

Revisions (0)

No revisions yet.