Thursday, November 5, 2020

Android Studio 4.2 Canary 16 available


Android Studio 4.2 Canary 16 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.

System Trace: Improved metrics for memory and graphics

In the CPU profiler, the System Trace feature now includes new metrics for analyzing app performance:

  • Events Table: Displays all trace events in the currently selected thread.
  • New tracks and track groups:
    • BufferQueue: In the Display section, this new track shows the buffer count of the app's surface BufferQueue.
    • CPU Frequency: In the CPU cores section, this track shows how hard each core is working.
    • Process Memory (RSS): The new Process Memory (RSS) track group shows the amount of physical memory currently in use by the app.

To learn more, see the release notes.

General Fixes

This update includes fixes for the following issues:

Android Gradle Plugin
  • Issue #150133257: Sanitize flavor names in BuildConfig
  • Issue #170922353: Upgraded from AGP 4.0.2 to 4.1.0 and app crashes with Resources$NotFoundException: Resource ID #0x0
App Inspection
  • Add IDE services for creating files
  • Have a way to stop the app inspector agent on the device
Apply Changes
  • [Properly implement overlay diff
  • Apply Changes followed by a no-change IWI run removes the AC changes
Build Output C++
  • cxxLanguageKindFromExtension return CPP for most files, even if they are not CPP files
CPU
  • [ChromeOS] C++ function tracing is not working: simpleperf depends on missing libncurses.so.5
Embedded Emulator
  • Wear OS Round: display encroaches on device frame during startup
Gradle
  • AGP recording OS version instead of OS name
Lint
  • Issue #170585495: Lint Baseline generates with platform depended file separators
New Project Wizard
  • [NewProject] Basic template illustration shadows are off with others
Profilers
  • Update the "report a bug" link to use the right component
Running Tests
  • Issue #162006827: Robolectric tests run in Android Studio 4.1 fail with a bad ASM dependency
  • Issue #170328018: AS 4.1+ fail to run junit tests, compailing about junit version being too low
Shrinker (R8)
  • Create a test for invalid signature rewriting
  • Issue #170915828: Failed to transform aar with StringIndexOutOfBoundsException when using R8 2.1.62 (used by AGP 4.1.0)
  • Issue #171369796: Method defined in both an interface and a base class throws null
  • Issue #171136616: R8 in AGP 4.1 optimization causes early initialization leading to NoClassDefFound error
  • Issue #171642432: Can't able to generate signed aab/apk with minifyEnabled set to true (> Task :app:minifyReleaseWithR8 FAILED)
  • Issue #171289133: Support allowshrinking modifier