Wednesday, August 26, 2020

Android Studio 4.2 Canary 8 available


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 C++ Import/Sync Code Analysis
  • Issue #36991569: Lint warning for animation created but not .start()ed
  • Issue #149416536: Request: Lint Warning for AnimatorInflator.loadAnimator on API 23 and below
Data Binding
  • 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.
Deployment Dexer (D8)
  • Issue #160905482: Desugaring broken for subclasses of ConcurrentHashMap
  • Issue #160909126: coreLibraryDesugaringEnabled seems to break ConcurrentHashMap when using Gson and reflection
Editing Import/Sync Layout Editor
  • Issue #162588517: Some exceptions by custom views are not reported in the issue panel
Lint
  • 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
Navigation Editor New Code/Templates Project Structure
  • Issue #162351817: AS treat whenObjectAdded clousere from android.productFlavors as flavour in Project Structure
Resources
  • Issue #160865813: Required attributes are not automatically inserted for FQN view tag
Run Shrinker (R8)
  • 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)
Android Studio
  • Issue #160271731: Set up integration test to make sure studio can open a compose file without issues
API
  • Issue #69953968: Allow "packagingOptions" to be defined per build type/variant
Code Editor Import/Sync
  • Issue #160909456: androidx compose project gradle sync breaks when upgrading to AS 4.2 Canary 4
Layout Inspector Lint
  • 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
Memory
  • Issue #161925082: The Instance View window is too small and cannot be made wider
Run