Support for Android Test Support Library 1. Improved ndk-build and cmake build speeds. Improved Gradle sync speed. AAPT2 is now enabled by default. Using ndkCompile is now more restricted.
You should instead migrate to using either CMake or ndk-build to compile native code that you want to package into your APK. To learn more, read Migrate from ndkcompile. If you're ready to upgrade to the new plugin, see Migrate to Android Plugin for Gradle 3.
So with this release, Android Studio includes Kotlin language support for Android development. To get started, read how to add Kotlin to your project.
Java 8 language features support You can now use certain Java 8 language features and consume libraries built with Java 8. Jack is no longer required, and you should first disable Jack to use the improved Java 8 support built into the default toolchain. To update your project to support the new Java 8 language toolchain, update the Source Compatibility and Target Compatibility to 1. To learn more, read how to use Java 8 language features. Android Profiler The new Android Profiler replaces the Android Monitor tool and provides a new suite of tools to measure your app's CPU, memory, and network usage in realtime.
You can perform sample-based method tracing to time your code execution, capture heap dumps, view memory allocations, and inspect the details of network-transmitted files. The event timeline at the top of the window shows touch events, key presses, and activity changes so you have more context to understand other performance events in the timeline.
The Logcat view also moved to a separate window it was previously inside Android Monitor, which was removed. Then, you can troubleshoot CPU performance issues using a variety of data views and filters. For more information, see the CPU Profiler guide.
Memory Profiler The Memory Profiler helps you identify memory leaks and memory churn that can lead to stutter, freezes, and even app crashes. It shows a realtime graph of your app's memory use, lets you capture a heap dump, force garbage collections, and track memory allocations. For more information, see the Memory Profiler guide. Network Profiler The Network Profiler allows you to monitor the network activity of your app, inspect the payload of each of your network requests, and link back to the code that generated the network request.
For more information, see the Network Profiler guide. APK profiling and debugging Android Studio now allows you to profile and debug any APK without having to build it from an Android Studio project—as long as the APK is built to enable debugging and you have access to the debug symbols and source files. This displays the unpacked APK files, but it does not decompile the code. So, to properly add breakpoints and view stack traces, you need to attach Java source files and native debug symbols. Device File Explorer The new Device File Explorer allows you to inspect your connected device's filesystem, and transfer files between the device and your computer.
This replaces the filesystem tool available in DDMS. For more information, see the Device File Explorer guide. Instant Apps support New support for Android Instant Apps allows you to create Instant Apps in your project using two new module types: Android Studio also includes a new modularize refactoring action to help you add support for Instant Apps in an existing project.
In the dialog that appears, select the module where the classes should go and click OK. And when you're ready to test your Instant App, you can build and run your Instant App module on a connected device by specifying the Instant App's URL within the run configuration launch options: For more information, see Android Instant Apps. For more information, see how to create an Android Things project. Adaptive Icons wizard Image Asset Studio now supports vector drawables and allows you to create adaptive launcher icons for Android 8.
You must set compileSdkVersion to 26 or higher to use adaptive launcher icons. For more information, read about Adaptive Icons.
Support for font resources To support the new font resources in Android 8. The layout editor can also preview the fonts in your layout. To try downloadable fonts, ensure that your device or emulator is running Google Play Services v For more information, read about Downloadable Fonts.
The tutorial includes new buttons to test your public and personal content indexing: In step 3, click Check for errors to verify that the indexable objects in your app have been added to the personal content index.
URL intent-filter validator Android Studio now supports a special tag in the manifest file that allows you to test your intent filter URLs.
These are the same tags that the App Links Assistant can create for you. If any one of the test URLs does not pass the intent filter definition, a lint error appears.
Such an error still allows you to build debug variants, but it will break your release builds. Layout Editor The Layout Editor has been updated with a number of enhancements, including the following: New toolbar layout and icons.
Updated layout in the component tree. Improved drag-and-drop view insertions. New error panel below the editor, showing all issues with suggestions to fix if available. Various UI enhancements for building with ConstraintLayout, including the following: New support to create barriers. New support to create groups: Select multiple views, and then right-click and select Chain.
Layout Inspector The Layout Inspector includes enhancements to make it easier to debug issues with your app layouts, including grouping properties into common categories and new search functionality in both the View Tree and the Properties panes. The APK Analyzer has also been updated with the following improvements: Bolded nodes to indicate that the nodes should not be removed when shrinking code. A button to show nodes that were removed during the shrinking process.
A button that restores the original names of nodes in the tree view that were obfuscated by ProGuard. The DEX Viewer now shows the estimated size impact of each package, class and method. New filtering options at the top to show and hide fields and methods. In the tree view, nodes that are references not defined in the DEX file appear in italics. It will eventually replace the DX compiler, but you can opt-in to use the new D8 compiler now.
DEX compilation directly impacts your app's build time,. And when comparing the new D8 compiler with the current DX compiler, D8 compiles faster and outputs smaller. To try it, set the following in your project's gradle. This makes it easier to keep your libraries up to date, especially when using a continuous integration CI system. All new projects now include the Google Maven repository by default. To update your existing project, add google in the repositories block of the top-level build.
Other changes Native debugging with Android Studio no longer supports bit Windows. We've chosen to focus on other platforms because very few developers are using this platform.
If you are using bit Windows and you plan to debug native code, you should keep using Android Studio 2. Added many new lint checks.
Also see the latest Android Emulator updates. Also see corresponding updates for Android Emulator The new App Links Assistant simplifies the process of adding Android App Links to your app into a step-by-step wizard. The Layout Editor now includes support for two new ConstraintLayout features: Define a view size based on an aspect ratio.
Create packed, spread, and weighted linear groups with constraint chains. The Layout Editor also now lets you create a list of favorite attributes so you don't have to click View all attributes to access the attributes you use most. For more information, see Adding a material icon.
New and updated annotations. The updated VisibleForTesting annotation now has an optional otherwise argument that lets you designate what the visibility of a method should be if not for the need to make it visible for testing.
Lint uses the otherwise option to enforce the intended visibility of the method. New lint baseline support allows you to use a snapshot of your project's current set of warnings as a baseline for future inspection runs so only new issues are reported. The baseline snapshot lets you start using lint to fail the build for new issues without having to go back and address all existing issues first.
New lint checks, including the following: Android Studio removes obsolete code that checks for SDK versions. Lint analyzes your code to make sure that your ObjectAnimator calls reference valid methods with the right signatures and checks that those methods are annotated with Keep to prevent ProGuard from renaming or removing them during release builds. Unnecessary Item Decorator Copy: Older versions of the RecyclerView library did not include a divider decorator class, but one was provided as a sample in the support demos.
Recent versions of the library have a divider decorator class. Lint looks for the old sample and suggests replacing it with the new one. Prior to Android 7.