Android Studio 4.2 Canary 8 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.
Database Inspector: Offline mode
In Android Studio 4.2 Canary 8 and higher, we've added the ability to keep inspecting your app's databases after a process disconnects, making it easier to debug your app after a crash. While offline, you can open and query tables. However, you cannot edit values or run modification statements until you reconnect to an app process.
To learn more, see the release notes.
General Fixes
This update includes fixes for the following issues:
Android Gradle Plugin- Issue #162358733: make sure artifact collision do not conflict when replaced.
- Issue #161826152: Gradle ran out of memory with 4GB max heap
- Issue #160473003: Set Custom application id per variant bug
- Issue #163039193: prepareLintJarForPublish destination file already exists
- Issue #160272302: NDK resolution outcome should not be printed
- Issue #36991569: Lint warning for animation created but not .start()ed
- Issue #149416536: Request: Lint Warning for AnimatorInflator.loadAnimator on API 23 and below
- Issue #161814391: Kotlin process annotation is busted starting in 4.2 canary 5
- Issue #152153710: Referencing a generic LiveData works with AGP <= 3.5.0 but fails for later versions.
- Issue #160192216: Bug: still can't build&run a new project on Android Studio
- Issue #160905482: Desugaring broken for subclasses of ConcurrentHashMap
- Issue #160909126: coreLibraryDesugaringEnabled seems to break ConcurrentHashMap when using Gson and reflection
- Issue #153616200: Lint produces false warnings on ProGuard config files
- Issue #161963743: IDE fails to stop Gradle daemon when using 6.6-rc-2
- Issue #162588517: Some exceptions by custom views are not reported in the issue panel
- Issue #158128960: AGP 4.0 false positive Instantiatable Lint check if Application extends java class
- Issue #67602844: Add Lint rule for unmodifiable SharedPreferences.getStringSet.
- Issue #161362796: False positives in lint check NonConstantResourceIdDetector
- Issue #159532832: Android Studio 4.2's lint error UI is confusing
- Issue #159935420: [Lint feature request]: Errors for using newer patterns in SimpleDateFormat
- Issue #118332958: Make whole file not translatable for pseudoLocalesEnabled true
- Issue #139100146: Request: each time we use RemoteViews, don't let code be built till unless all views in the layout are supported
- Issue #160195388: Can't connect two destinations in navigation map
- Issue #162565516: New Module button not showing Dialog
- Issue #162566204: underscore appends when caps is on while naming a new activity for the layout name
- Issue #162351817: AS treat whenObjectAdded clousere from android.productFlavors as flavour in Project Structure
- Issue #160865813: Required attributes are not automatically inserted for FQN view tag
- Issue #162259273: Wrong Activity is use for launch when there is an alias
- Issue #161403944: With AGP 4.1.0.beta01+, minifyEnabled = true leads to runtime crash due to java.lang.VerifyError
- Issue #160901582: CompilationError during R8 phase when optimizations enabled
Additionally the issues below were addressed in this release but may not be necessarily fixed:
Android Gradle Plugin- Issue #162528480: AGP 4.2.0-alpha07 fails with java.lang.IllegalStateException: Failed to pseudo-localize string
- Issue #161115878: GradlePlugin: Kotlin access to extra properties in ProductFlavor (it should be ExtensionAware)
- Issue #160271731: Set up integration test to make sure studio can open a compose file without issues
- Issue #69953968: Allow "packagingOptions" to be defined per build type/variant
- Issue #162196087: Frequent UI freezes
- Issue #160909456: androidx compose project gradle sync breaks when upgrading to AS 4.2 Canary 4
- Issue #162448507: Add functionality to snapshot view hierarchy
- Issue #162656657: Add refresh button
- Issue #163080422: lint.xml: synchronize with IDE, allow directory nesting, support configurations, etc
- Issue #134987035: Use of LintOptions severity overrides breaks OTHER check validations
- Issue #122769438: [ConstantLocale] Use of Locale.getDefault() within an enum value method is incorrectly flagged as being assigned to a static final constant
- Issue #161584622: [lint] DiffUtilEquals false positive when type is exactly known
- Issue #161925082: The Instance View window is too small and cannot be made wider
- Issue #151532381: [4.1-Canary2] Adding JVM agent flags breaks Run/Debug.