Android Studio 4.2 Canary 9 is now available in the Canary and Dev channels.
If you have Android Studio set to receive updates on the Canary or Dev channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it here.
For information on new features and changes in all preview builds of Android Studio 4.2, see the Android Studio Preview release notes. For details of bugs fixed in each preview release, see previous entries on this blog.
We greatly appreciate your bug reports, which help us to make Android Studio better. If you encounter a problem, let us know by reporting a bug. Note that you can also vote for an existing issue to indicate that you are also affected by it.
Support for Safe Args
Safe Args is a Gradle plugin that generates simple object and builder classes for type-safe navigation and access to any associated arguments. Android Studio 4.2 Canary 9 and higher includes special support when working with Safe Args, as described below:
- Autocompletions for Directions, Args, and the various builder classes
- Support for both Java and Kotlin safe args plugins
- Navigation from source to XML
General Fixes
This update includes fixes for the following issues:
Android Gradle Plugin- Issue #64551265: Allow application of the Android Gradle plugins using Gradle's plugins block
- Issue #164163031: Android Studio 4.1 RC1 is not installing test apk built using AGP 4.1 RC1 on Emulator
- Issue #165833833: Break if ANDROID_SDK_HOME and ANDROID_PREFS_ROOT point to different location
- Issue #166168605: AndroidLocation should use a logger object to output warnings.
- Issue #166161723: Invalid "Using ANDROID_SDK_HOME for the location" warning: env var not set
- Issue #165017523: Android IntelliJ plugin: Gradle sync failed: Property found to be invalid, this should never happen!
- Issue #79995034: Lint unused id does not take in account constraint_referenced_ids
- Issue #166113037: Line fails with StackOverflowError with core lib desugaring enabled
- Issue #163512022: Allow custom lint jars to be specified via lint.xml
- Issue #161410735: Applying LintFix in different file than warning fails
- Issue #164794528: ViewBinding - <fragment> tag should be excluded from generated binding fields