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 secure launch channel. The main focus areas for this launch is an upgraded IntelliJ platform and a handful of latest options centered round enhancing your productiveness as an Android app developer.

We all know generally upgrading your app venture to the newest model will be difficult. To handle this, we have now 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 have now 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. Should you use these options and you’re on the lookout for the following secure model of Android Studio, you must obtain Android Studio 4.2 in the present day!

Take a look at the record of latest 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 useful method to make sure knowledge encapsulation if you wish to go knowledge between two locations in your app when you’re 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

    Protected Args Assist

  • 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 machine sorts, plus we added ViewBinding to every of the templates as properly. 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 may 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, to be able 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 possibility as properly.

Query History with the Database Inspector

Question Historical past with the Database Inspector

  • Retrace Command Line Software As a part of your app compilation course of, R8 obfuscates Kotlin and Java programming language code. This may make stack traces unimaginable to decipher since sorts and technique names are obfuscated and shortened to cut back the reminiscence footprint of your app. The Retrace command line software deobfuscates these names and recovers inlined frames utilizing a mapping.txt file, making stack traces comprehensible once more The brand new standalone software will 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 in the event you use deprecated APIs. To resolve this and to raised 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 will probably be executed in your venture to improve to the next model of AGP, preview precisely which recordsdata will probably be affected by the AGP improve, and lastly globally replace deprecated configurations.

AGP Upgrade Assistant<

AGP Improve Assistant

  • Apply Modifications EnhancementsApply Changes permits you to push code and useful resource adjustments to your working app with out restarting your app. In Android Studio 4.2 we have now expanded the variety of appropriate adjustments with Apply Modifications to incorporate including sources (which accounted for 23% of adjustments that wanted a full restart) and including static closing fields (e.g. constants) when working on an Android 11+ machine or emulator.
  • Android Gradle Plugin 4.2 – With AGP 4.2, we made a lot of notable adjustments. First, we applied a brand new sources compiler which ought to help in enhancing construct efficiency particularly on Home windows machines. Secondly, we have now 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 extra AGP updates here.
// construct.gradle.kts

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

APK v3 and APK v4 singing help

Check

  • A number of Machine Deployment – Generally when you’re creating 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 immediately into the machine choice menu in Android Studio 4.2. To notice, in the event you deploy exams to a number of gadgets chances are you’ll be prompted to allow this habits.

Multiple Device Deployment

A number of Machine Deployment

Profile

  • System Hint Enhancements – To know 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 may 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.three Platform Replace
    • Protected Args Assist
    • New Mission Wizard and Module Wizard Updates

    Debug

    • Database Inspector Enhancements
    • Retrace Command Line Software

    Construct

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

    Check

    • A number of Machine 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. In case you are utilizing a earlier launch of Android Studio, you may merely replace to the newest model of Android Studio. If you wish to keep a secure model of Android Studio, you may run the secure launch model and canary launch variations of Android Studio Arctic Fox on the identical time. Learn more.

We respect any suggestions on stuff you like, and points or options you wish to see. Should you discover a bug or concern, be happy to file an issue. Comply with us — the Android Studio improvement crew ‐ on Twitter and on Medium.

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here