Android Studio 4.2

Posted by Jamal Eason, Product Supervisor, Android

Android logo

We’re excited to announce that Android Studio 4.2 is now accessible to obtain within the steady launch channel. The main focus areas for this launch is an upgraded IntelliJ platform and a handful of latest options centered round bettering your productiveness as an Android app developer.

We all know generally upgrading your app venture to the newest model may be difficult. To handle this, we’ve a brand new app venture improve assistant in Android Studio 4.2 that makes it simpler emigrate your venture and to reap the benefits of the newest Android Gradle Plugin APIs. Moreover, we’ve added a complete vary of enhancements to the present options just like the Database Inspector, System Hint, SafeArgs help, Apply Modifications, the brand new venture wizard and extra. For those who use these options and you’re in search of the subsequent steady model of Android Studio, it’s best to obtain Android Studio 4.2 immediately!

Take a look at the checklist of latest options in Android Studio 4.2 under, organized by key developer flows.

Develop

  • IntelliJ Platform Replace – Android Studio 4.2 consists of all the key options and updates present in IntelliJ IDEA Neighborhood Version 2020.2, which incorporates an up to date GitHub UI for pull requests, and new centralized issues window, and extra. Learn more.
  • Secure Args Help – Utilizing Secure Args is the really helpful manner to make sure knowledge encapsulation if you wish to cross knowledge between two locations in your app if you find yourself utilizing the Jetpack Navigation part. With Android Studio 4.2, you now have code autocompletion for Instructions Args, and code navigation from supply to XML. Learn more.

    safe arfs support

    Secure Args Help

  • New Mission Wizard and Module Wizard Updates – This launch features a visible refresh to the brand new venture wizard to make it simpler to find Android system sorts, plus we added ViewBinding to every of the templates as effectively. Moreover, we additionally made a visible replace to the brand new module wizards to make it simpler to know the number of module sorts you possibly can add to your app.

New Project Wizard

 New Module Wizard

New Mission Wizard & New Module Wizard

Debug

  • Database Inspector Enhancements – Managing and monitoring your in app database is simpler to do with the Database Inspector. On this launch we made a pair new enhancements. We added a brand new offline mode, with the intention to nonetheless hold inspecting your app’s databases after a course of disconnects, making it simpler to diagnose your app after a crash. And we added a useful question historical past choice as effectively.

Query History with the Database Inspector

Question Historical past with the Database Inspector

  • Retrace Command Line Instrument As a part of your app compilation course of, R8 obfuscates Kotlin and Java programming language code. This will make stack traces not possible to decipher since sorts and technique names are obfuscated and shortened to cut back the reminiscence footprint of your app. The Retrace command line device deobfuscates these names and recovers inlined frames utilizing a mapping.txt file, making stack traces comprehensible once more The brand new standalone device may be discovered at ./sdk/cmdline-tools/newest/bin/retrace. Learn more.

Construct

  • AGP Improve Assistant – Migrating your venture to the newest Android Gradle Plugin (AGP) can generally be tough particularly if you happen to use deprecated APIs. To unravel this and to higher put together you for the transition to the Android Gradle Plugin 7.0, we created a brand new improve assistant. The assistant permits you to toggle the instructions that might be executed in your venture to improve to a better model of AGP, preview precisely which recordsdata might be affected by the AGP improve, and lastly globally replace deprecated configurations.

AGP Upgrade Assistant<

AGP Improve Assistant

  • Apply Modifications EnhancementsApply Changes allows you to push code and useful resource adjustments to your working app with out restarting your app. In Android Studio 4.2 we’ve expanded the variety of suitable adjustments with Apply Modifications to incorporate including sources (which accounted for 23% of adjustments that wanted a full restart) and including static ultimate fields (e.g. constants) when working on an Android 11+ system or emulator.
  • Android Gradle Plugin 4.2 – With AGP 4.2, we made quite a lot of notable adjustments. First, we carried out a brand new sources compiler which ought to support in bettering construct efficiency particularly on Home windows machines. Secondly, we’ve up to date the default Java programming language to model 8. Lastly, we added help for the APK v3 and APK v4 signing format. Be taught extra about further AGP updates here.
// construct.gradle.kts

android {
   ...
   signingConfigs {
      config {
          ...
          enableV3Signing(true)
          enableV4Signing(true)
      }
   }
}

APK v3 and APK v4 singing help

Take a look at

  • A number of System Deployment – Generally if you find yourself growing and testing your app it’s useful to deploy your app on a number of gadgets to see the outcomes. We introduced again this function from very early variations of Android Studio and built-in it instantly into the system choice menu in Android Studio 4.2. To notice, if you happen to deploy exams to a number of gadgets you might be prompted to allow this conduct.

Multiple Device Deployment

A number of System Deployment

Profile

  • System Hint Enhancements – To grasp the fine-grained efficiency traits of your app, it helps to make use of the system trace features inside of the Android Studio profiers. With this launch of Android Studio, system hint now has a brand new occasions desk. With this new desk view you possibly can see; BufferQueue, RSS reminiscence counters, and CPU core frequency all inside a compact person interface.

    Profiler with new System Trace Events Table

    Profiler with new System Hint Occasions Desk

    To recap, Android Studio 4.2 consists of these new enhancements & options:

    Develop

    • IntelliJ 2020.2.3 Platform Replace
    • Secure Args Help
    • New Mission Wizard and Module Wizard Updates

    Debug

    • Database Inspector Enhancements
    • Retrace Command Line Instrument

    Construct

    • AGP Improve Assistant
    • Apply Modifications Enhancements
    • Android Gradle Plugin 4.2

    Take a look at

    • A number of System Deployment

    Profile

    • System Hint Enhancements

    Take a look at the Android Studio release notes, Android Gradle plugin release notes, and the Android Emulator release notes for extra particulars.

Getting Began

Obtain

Obtain the newest model of Android Studio 4.2 from the download page. If you’re utilizing a earlier launch of Android Studio, you possibly can merely replace to the newest model of Android Studio. If you wish to keep a steady model of Android Studio, you possibly can run the steady launch model and canary launch variations of Android Studio Arctic Fox on the similar time. Learn more.

We respect any suggestions on belongings you like, and points or options you want to see. For those who discover a bug or difficulty, be at liberty to file an issue. Observe us — the Android Studio growth crew ‐ on Twitter and on Medium.

Java is a registered trademark of Oracle and/or its associates.

Recent Articles

You informed us: You do not agree with Tim Cook dinner’s stance on side-loading apps

Every week in the past, Apple CEO Tim Cook dinner spoke about iPhone safety in an interview. He deemed the observe of side-loading apps...

Samsung Galaxy M22 Anticipated to Help 25W Quick Charging

Samsung Galaxy M22 will include 25W quick charging assist, an inventory on the US Federal Communications Fee (FCC) website has advised. The unannounced...

Related Stories

Stay on op - Ge the daily news in your inbox