Skip to content

Most visited

Recently visited

navigation

New Features in Android Studio Preview

Android Studio 3.0 has been released to stable. Download it here.

The latest preview version is Android Studio 3.1 and this page provides a summary of all the new features and changes. All these features are available in the latest canary release, and might not be available in the beta release channel yet.

For the latest news on releases, also see the Release Updates.

New DEX compiler

By default, Android Studio 3.1 Canary 1 and higher use a new DEX compiler called D8, which was announced on the Android Developers Blog.

DEX compilation is the process of transforming .class bytecode into .dex bytecode for the Android Runtime (or Dalvik, for older versions of Android). Compared to the current compiler, called DX, D8 compiles faster and outputs smaller DEX files, all while having the same or better app runtime performance.

D8 shouldn't change your day-to-day app development workflow. However, if you experience any issues related to the new compiler, please report a bug. You can temporarily disable D8 and use DX by including the following in your project's gradle.properties file:

android.enableD8=false

Sample native processes with CPU Profiler

The CPU Profiler now includes a default configuration to record sampled traces of your app's native threads. You can use this configuration by deploying your app to a device running Android 8.0 (API level 26) or higher and then selecting Sampled (Native) from the CPU profiler's recording configurations dropdown menu. After that, record and inspect a trace as you normally would.

Remember, you can change default settings, such as the sampling interval, by creating a recording configuration. To switch back to tracing your Java threads, select either a Sampled (Java) or Instrumented (Java) configuration.

Updates to Lint

When you run lint from the command line, lint now also analyzes your Kotlin classes.

If you're running lint on a project that you created using an older version of Android Studio, you may encounter the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintDebug'.
> Could not resolve all files for configuration ':app:_lintClassPath'.
   > Could not find com.android.tools.lint:lint-gradle:<build_tools_version>.

To resolve this issue, for each project that you would like to run lint on, include Google's Maven repository in the top-level build.gradle file, as shown below:

allprojects {
    repositories {
        // The order in which you list these repositories matter.
        google()
        jcenter()
    }
}
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)