Google has released the stable version of Android Studio 3.0 and a Developer Preview of Android Oreo 8.1.
Android Studio 3.0 was first announced at Google I/O 2017, but it was a canary release at that time. Now, it is generally available. From the list of new features we have noticed the following:
- Native support for Kotlin, creating new Kotlin files or converting Java ones to the new language. Kotlin seems to be well received by the community. According to a Realm report, about 15% of developers are currently using Kotlin for their Android projects, with 20% of applications which initially were written in Java now being written in Kotlin. Realm predicts that 50% of developers will use Kotlin by the end of 2018.
- Plugin for Gradle 3.0.0 with faster build times especially for large projects with many modules.
- Support for some Java 8 features: lambda expressions, method references, type annotations, interface methods, repeating annotations.
- The default toolchain is the one coming with JDK 8. Jack and Retrolambda have been deprecated and developers are invited to migrate to the new toolchain.
- Android Profiler replaces Android Monitor, and it is used to measure CPU, memory and network usage in real time. It includes sample-based method tracing, captures heap dumps, can be used to visualize memory allocations and to inspect network transmitted files.
- APK Profiler used to profile and debug prebuilt APKs. Details can found here.
- The Device File Explorer allows viewing files on the device and transferring them to the computer.
- Android Instant Apps are now supported through two modules.
- Support for adaptive icons introduced with Android 8.0.
- Improved Layout Editor.
Simultaneously, Google has released Android 8.1 Developer Preview which comes with some new features but also some performance improvements and bug fixes for 8.0:
- Neural Networks API (NNAPI) which provides hardware acceleration for machine learning code executed on Android devices. Both model creation, compilation, and execution are supported. NNAPI is meant to be used by ML frameworks and tools, not directly by applications.
- Notification sounds are limited to 1/sec. If an application wants to generate more sounds than the limit, additional alerts are not processed.
- Two new constants have been introduced:
FEATURE_RAM_LOW
andFEATURE_RAM_NORMAL
, enabling developers to target devices with small amounts of RAM. - The
SharedMemory
API enables a process to pass to another process a memory zone. - Enhancements: Autofill, EditText, Safe Browsing, WallpaperColors, Fingerprint, etc.
Those interested in getting Android 8.1 on their devices to test applications against it need to enroll in the Android Beta Program. Only some Nexus and Pixel devices plus the LG Watch Sport and the emulator are eligible for this version of Android.