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.
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.
Yes. We will use Java 8 soon!
https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html
Most easy way
You can enable java 1.8 support for android project.
Open Project Structure
Either by pressing Ctrl + Shift + Alt + S
Or
File > Project Structure
Update the Source Compatibility and Target Compatibility to 1.8 in the Project Structure dialog as shown (click File > Project Structure).
Note: Java 1.8 support can be enabled for Android Studio 3.0.0 or higher. See Documentation for further reading.
Android OFFICIALLY supports Java 8 as of Android N.
Feature announcements are here, the Java 8 language announcement is:
Google just announced that Java 8 will be natively support by Android and that the Jack toolchain will deprecate:
More Info here: https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html
I figured I would post an updated answer for those looking at for something a little more current.
Currently Android and Android Studio are supporting a subset of Java 8 features. According to the Android documentation located on their website, Google says:
Additionally, the following Java 8 language APIs are also available:
Adding the following fixed the problem for me (Android studio 2.3.2):
build.gradle (Project)
build.gradle (Module: app)