New features in Android Studio Preview

Android Studio 3.3 has been released to the stable channel. Download it here.

Android Studio 3.4 is currently in the Beta channel.

Android Studio 3.5 is currently in the Canary and Dev channels.

This page provides a summary of the new features and changes in these preview versions.

For the latest news on releases, including a list of notable fixes in each release, also see the Release updates.

If you encounter any problems using a preview version of Android Studio, please let us know. Your bug reports help to make Android Studio better.

Android Studio 3.5

This section provides a summary of the new features and changes in Android Studio 3.5.

Apply Changes

Apply Changes lets you push code and resource changes to your running app without restarting your app—and, in some cases, without restarting the current activity. Apply Changes replaces Instant Run with a completely new approach for build optimization. Instead of rewriting the bytecode of your APK during build time, Apply Changes redefines classes on the fly by leveraging the runtime instrumentation supported in Android 8.0 (API level 26) or higher.

In addition, Android Studio now prompts you to decide whether to restart your app or activity when it detects that changes are not compatible with Apply Changes. This extra control should provide you with a more consistent and predictable experience compared to the behavior of Instant Run.

To use Apply Changes, do the following:

  • If you want to apply only your code changes without restarting the current activity, click Apply Code Changes Apply Code Changes icon or press Ctrl+Alt+F10 (or Command+Shift+Ctrl+R on macOS).
  • If you want to apply your resource and code changes without restarting your app, click Apply Changes Apply Changes icon or press Ctrl+F10 (or Command+Ctrl+R on macOS).

    This restarts the current activity without restarting your app.

Limitations

  • Apply Changes is only compatible with devices running Android 8.0 (API level 26) or higher.
  • Like with Instant Run, certain code changes cannot be applied until the app is restarted, including the following:
    • Adding or deleting a class, method, or field
    • Changing the manifest
    • Changing method signatures
    • Changing modifiers of methods or classes
    • Renaming classes
    • Changing class inheritance
    • Adding or removing a resource

Known issues

  • The speed of Apply Changes can sometimes be slower than Instant Run. The initial priority was for stability, and we'll continue to improve performance throughout the coming months.
  • For debugging, Apply Changes is currently only supported on Android 9.0 (API level 28) or higher.
  • You might see unexpected behavior if you use custom classloaders other than the system and application thread context.

Incremental annotation processing for Data Binding

Android Gradle plugin 3.5.0-alpha05 and higher now support incremental Java compilation when using Data Binding annotations, which makes your incremental builds faster. To learn more about this optimization, and which popular annotation processors are incremental, read Use incremental annotation processors.

Android Studio 3.4

This section provides a summary of the new features and changes in Android Studio 3.4.

New lint check configuration

  • lintChecks: This is an existing configuration that you should use only for lint checks you want to run when building your project locally.
  • lintPublish: Use this new configuration for library projects in which you want to include your lint checks in the published AAR. This means that projects that consume your library also apply those lint checks.

Resource manager

Resource management is a new tool window for creating, managing, and using resources in your app. This tool window allows you to do the following:

  • Bulk import: You can now import multiple drawable assets at once by either dragging and dropping them into your Resources tool window or the Resource management import wizard. The wizard can also convert your SVG files into VectorDrawables.
  • Drag and drop assets: From the Resource management tool window you can drag and drop drawables onto the Layout Editor design and text view surfaces.
  • View alternative versions: You can now view alternative versions of your resources by double-clicking a resource within the Tool window. This view shows the different versions you have created and the qualifiers that were included.s
  • Tile and list views: You can change the view within the tool window to help visualize your resources.

If this tool window does not appear in your Canary build, you can access it by selecting View > Tool Windows > Resources.

Updated Project Structure dialog

Android Studio 3.3 Canary 4 introduces updates to the Project Structure dialog (PSD). Select File > Project Structure from the menu bar to manage how your project is configured using the following new features:

  • Visualize the actual structure of a project, as resolved by Gradle as a project sync. For example, you can visualize the dependency graph of each module.
  • Get notifications when new versions of your library dependencies are available.
  • Configure a project through the dialog UI, without manually editing build.gradle files.

R8 enabled by default

R8 is a new tool for code shrinking and obfuscation that replaces ProGuard, and it's enabled by default. If you experience issues with R8, please report a bug. You can disable R8 by adding the following to your project’s gradle.properties file:

android.enableR8 = false

Support for AARs

R8 now supports Android library projects. If you experience issues using R8 when building AARs, please report a bug. You can disable R8 for only your Android library projects by adding the following to your project’s gradle.properties file:

android.enableR8.libraries = false