This course has been updated to reflect the new support for Java 8 syntax in the Android SDK. Android Studio 3 now includes that support with the default compiler toolchain. In a new chapter, learn how to configure a project to use Java 8, and then how to use some of the most popular features of Java 8.
- [Instructor] This course has been updated to reflect new support for Java 8 syntax in Android. In Android Studio 2.2, a new experimental compiler and linker were introduced, named Jack and Jill, making Java 8 support possible for the first time. However, that compiler and linker tool chain have now been deprecated, and in Android Studio 3, Java 8 is supported with the Android SDK's default compiler tool chain. The course has a new chapter now devoted to Java 8 syntax.
I'll show you how to configure a project for use of Java 8 with just a couple of new lines in your gradle build file, and then I'll demonstrate some of the most popular syntax improvements in Java 8, including lambda expressions, such as these event handlers, method references, that let you pass in methods by name, and default and static methods in interfaces. I'll also describe other Java 8 features that are currently only available in projects that have a minimum SDK level of API 24 or later.
That's Android 7. But you might find for your own projects that just the features that are available across all Android versions are worth it to add Java 8 support to your Android projects.
Watch these Java tutorials to learn smarter, more efficient methods for Android app development.
- Preparing the development environment
- Packaging and running Android apps
- Optimizing Java code for Android
- Implementing event handler interfaces
- Defining custom callback methods
- Working with the Android SDK's Java packages
- Storing data
- Reading text files
- Parsing JSON and XML data
- Managing device sensors
- Playing audio