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 obtainable to obtain within the steady launch channel. The main focus areas for this launch is an upgraded IntelliJ platform and a handful of recent options centered round bettering your productiveness as an Android app developer.

We all know typically upgrading your app undertaking to the newest model could be difficult. To handle this, we now have a brand new app undertaking improve assistant in Android Studio 4.2 that makes it simpler emigrate your undertaking and to make the most of the newest Android Gradle Plugin APIs. Moreover, we now have added a complete vary of enhancements to the prevailing options just like the Database Inspector, System Hint, SafeArgs help, Apply Modifications, the brand new undertaking wizard and extra. For those who use these options and you’re in search of the following steady model of Android Studio, it’s best to obtain Android Studio 4.2 right now!

Try the checklist of recent options in Android Studio 4.2 beneath, organized by key developer flows.

Develop

  • IntelliJ Platform Replace – Android Studio 4.2 consists of all the foremost 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.
  • Protected Args Assist – Utilizing Protected Args is the really helpful method to make sure information encapsulation if you wish to cross information between two locations in your app when you find yourself utilizing the Jetpack Navigation element. 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

    Protected Args Assist

  • New Venture Wizard and Module Wizard Updates – This launch features a visible refresh to the brand new undertaking wizard to make it simpler to find Android gadget varieties, plus we added ViewBinding to every of the templates as nicely. Moreover, we additionally made a visible replace to the brand new module wizards to make it simpler to grasp the number of module varieties you possibly can add to your app.

New Project Wizard

 New Module Wizard

New Venture 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, as a way to nonetheless maintain 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 nicely.

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 could make stack traces not possible to decipher since varieties and methodology names are obfuscated and shortened to scale back the reminiscence footprint of your app. The Retrace command line instrument deobfuscates these names and recovers inlined frames utilizing a mapping.txt file, making stack traces comprehensible once more The brand new standalone instrument could be discovered at ./sdk/cmdline-tools/newest/bin/retrace. Learn more.

Construct

  • AGP Improve Assistant – Migrating your undertaking to the newest Android Gradle Plugin (AGP) can typically be difficult particularly if you happen to use deprecated APIs. To resolve 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 means that you can toggle the instructions that might be executed in your undertaking to improve to the next model of AGP, preview precisely which information might be affected by the AGP improve, and lastly globally replace deprecated configurations.

AGP Upgrade Assistant<

AGP Improve Assistant

  • Apply Modifications EnhancementsApply Changes helps you to push code and useful resource modifications to your operating app with out restarting your app. In Android Studio 4.2 we now have expanded the variety of appropriate modifications with Apply Modifications to incorporate including assets (which accounted for 23% of modifications that wanted a full restart) and including static closing fields (e.g. constants) when operating on an Android 11+ gadget or emulator.
  • Android Gradle Plugin 4.2 – With AGP 4.2, we made numerous notable modifications. First, we carried out a brand new assets compiler which ought to support in bettering construct efficiency particularly on Home windows machines. Secondly, we now have 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

Check

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

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 consumer 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
    • Protected Args Assist
    • New Venture 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

    Check

    • A number of System Deployment

    Profile

    • System Hint Enhancements

    Try 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. In case you are utilizing a earlier launch of Android Studio, you possibly can merely replace to the newest model of Android Studio. If you wish to preserve 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 identical time. Learn more.

We admire any suggestions on stuff you like, and points or options you wish to see. For those who discover a bug or difficulty, be happy to file an issue. Comply with us — the Android Studio growth group ‐ on Twitter and on Medium.

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

Recent Articles

15 greatest simulation video games for Android – Android Authority

Joe Hindy / Android AuthoritySimulation video games are some of the expansive and common recreation genres. It’s additionally some of the common on cellular...

Marvel’s Loki Is Already Placing Twists on Its Twists

Loki and B-15 face an unseen menace.Photograph: MarvelIn over a decade of flicks and now TV reveals, we’ve gotten used to Marvel...

We investigated whether or not digital contact tracing really labored within the US

Within the spring of 2020, the primary variations of covid-19 publicity notification techniques have been launched to the general public. These techniques promised...

Samsung Galaxy A72 Evaluate: Definitely worth the Premium Over the Galaxy A52?

The Samsung Galaxy A52 and Galaxy A72 duo have been out there for just a few months. We have already examined the Galaxy A52,...

What are Google Workspace, Areas, and good canvas? This is an explainer

Supply: Nick Sutrich / Android Central Google Workspace is the reply to the query that Google customers have had for years: why cannot this firm...

Related Stories

Stay on op - Ge the daily news in your inbox