Tuesday, July 14, 2020

Android Studio 4.0.1 available

Android Studio 4.0.1 is now available in the Stable channel.

If you already have an Android Studio build on the Stable channel, you can get the update by clicking Help > Check for Update (Android Studio > Check for Updates on macOS). Otherwise, you can download here.

For information on new features and changes in all releases of Android Studio, see the Android Studio release notes.

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.

General fixes

This update also includes fixes for the following public issues:

Android Gradle Plugin
  • Issue #154069245: Jacoco task reprocessed the same files too many times - incremental builds
  • Issue #157446242: build\build-attribution\androidGradlePluginAttributionData: The process cannot access the file because it is being used by another process
  • Issue #157888755: versionName wrong in output.json file after building .apk
  • Issue #140747218: Improve error messages for exceptions thrown from Jetifier
Dexer (D8)
  • Issue #157806261: One or more instruction is preventing default interface method from being desugared: java.util.function.Consumer it.unimi.dsi.fastutil.chars.CharConsumer.andThen(java.util.function.Consumer)
  • Issue #158815562: Desugaring: static methods don't work for subclasses
  • Issue #156142802: Backport changes that made D8 lenient with non-sense line numbers and local variable table
  • Issue #148661132: Assertion error on valid locals info
  • Issue #158124557: Library desugaring does not rewrite generic signature
Import/Sync
  • Issue #158018185: When using "make project", AS reports build failures when using Kotlin DSL in buildSrc
Shrinker (R8)
  • Issue #157966650: R8 2.0.74 raise NullPointerException with -dontobfuscate option.
  • Issue #158432019: IncompatibleClassChangeError happens with R8 + Kotlin object + Java lambda
  • Issue #158018192: R8 2.0.74 produces invalid dex file when build "release" mode
  • Issue #157223339: R8 2.0.74 Return of service loader rewrite issues
  • Issue #157926129: minifyReleaseWithR8 throws java.lang.StackOverflowError after updating Gradle Plugin to 4.0.0
Testing
  • Issue #146447085: Cannot run Android Instrumented Tests on Simulator with API < 21