Android Studio 4.2 brings in a project upgrade wizard to help with migration • DEVCLASS

Google released Android Studio 4.2 with an upgraded IntelliJ platform, upgrade wizard, and features aimed at improving Android developer productivity.

announced on Android Developer BlogAndroid Studio 4.2 includes all major features and updates found in the IntelliJ IDEA Community Edition 2020.2 release, which includes an updated GitHub UI for pull requests and a new centralized issues window.

However, probably one of the most useful features for developers is the AGP Upgrade Wizard. This was designed to make it easier to migrate projects to the latest Android Gradle Plugin, which can be a tricky process if developers are still using outdated APIs, according to Google. The Upgrade Wizard allows users to toggle the commands that will be run on their project to upgrade to a higher version of AGP, preview the files that will be affected by the AGP upgrade, and update globally obsolete configurations.

This release also features a visual refresh of the new Project Assistant to make it easier to discover Android device types, while Google has also added ViewBinding to each of the models. A visual update has also been made to the new module wizards to make it easier for users to understand the variety of module types that can be added to apps.

On the debugging side, Android Studio 4.2 brings some improvements to the database inspector. These include a new offline mode, so developers can continue to inspect their application databases after a process goes offline, making it easier to diagnose after a crash. Google has also added a query history option.

A Retrace command-line tool allows developers to de-obfuscate code from the Kotlin and Java programming languages, which is obfuscated as part of the application compilation process. It fetches inline frames using a mapping.txt file, making stack traces understandable again. This new standalone tool can be found at ./sdk/cmdline-tools/latest/bin/retrace.

Android Studio 4.2 also increases the number of compatible changes that Apply Changes can apply to a running application without restarting it, to include adding resources and static final fields (e.g. constants) when running on Android 11+ device or emulator.

For details on all the changes in Android Studio 4.2, see Android Studio release notesandroid gradle plugin release notesand Android emulator release notes.

Comments are closed.