Android Studio 3.1 Canary 6 is now available in the Canary and Dev channels.





upgrading from 3.1 Canary 1, 2, or 3, you need to download the latest version of the IDE from the If you are, you need to download the latest version of the IDE from the Android Studio Preview site





You might receive an error when updating your project to 3.1 Canary 6. If so, you need to manually change the Android Gradle plugin version to

3.1.0-alpha06

as shown here:

buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.1.0-alpha06' } }

Sync Project with Gradle Files . T Then click . T

he first sync will fail and you'll see a message asking you to upgrade the Gradle version in the wrapper, so follow the Quick Fix to apply the update.





This release includes general bug fixes and the following new features:

Upgrades the base IDE to IntelliJ 2017.3 . You may notice changes in behavior and performance as a result of this merge. If you encounter changes you believe to be regressions, please report a bug

Updates the Kotlin plugin to version 1.2.

Updates to Data Binding

You can now use a LiveData object as an observable field in data binding expressions. The ViewDataBinding class now includes a new setLifecycle method that you need to use to use to observe LiveData objects.



New compiler : You can preview a new incremental compiler for your data binding classes. To enable this compiler, add android.databinding.enableV2=true to your gradle.properties file, or include the following command line argument: -Pandroid.databinding.enableV2=true . Keep in mind, this compiler is not backwards compatible , so you need to recompile all of your data binding classes with this feature enabled to take advantage of incremental compilation. Note the following behavior changes when using the new compiler:



The Android plugin for Gradle now generates Binding classes for your layouts before compiling your Java code.





If a layout is included in more than one target resource configuration, the data binding library now defaults the view type to android.view.View for all views that share the same resource id but not view type.





Binding classes for library modules are compiled and packaged with its AAR. That is, app modules that depend on those library modules no longer need to regenerate those classes.





A module’s binding adapters can no longer change the behavior of adapters of the module’s dependencies. That is, binding adapters now only affect code in its own module and downstream consumers of the module.



The ObervableField class can now accept other Observable objects in its constructor. The ObservableField object registers a change when one of its Observable dependencies register a change.

Known issues:

Updating existing projects to the alpha 6 Android Gradle plugin fails. You must manually update to 3.1.0-alpha06 as described above.

When using Java 8 language features, the intentions menu item to “Set Language Level to 8" is missing.

AAPT2 may throw an error when adding a tabbed activity to a project which is created with Maps activity.

You may get an IsolationException error while building LintTest project.

Certain devices may cause a java.lang.AssertionError while working with profilers.

You may receive a "File Creation failed" error while recording espresso tests for Instant Apps that include code written in Kotlin.

You may receive a fatal exception when using Java 8 language features with Android Instant Apps projects.

Your app may see FATAL_EXCEPTION "Error inflating class ImageView" when adding color resources to an ImageView using the theme attribute.

You may receive a TimeoutException while deploying a Wear project to the emulator.

When creating a Android Instant Apps project that includes a BottomNavigationView , you may get a null pointer exception.





If you already have an Android Studio build on the

, you can get the update by clicking

(or

on Mac). Otherwise, you can

.