On May 28, 2020, Google released Android Studio 4.0, the most recent version of its IDE (Integrated Development Environment). This latest version is supposed to assist developers to design and develop apps faster and code smarter.
Now Android Studio 4.0 can be downloaded for Mac, Windows, and Linux straight from Android Developer site. Read on below for new features and further highlights you can get in this stable version.
What’s New in Android Studio 4.0?
Google has released Android Studio 4.0 stable version that brings a vast swath of new development features, design tools and many more. Read on to learn more about what’s new in this latest version of Android Studio:
1. Upgraded Layout Inspector
On debuggable apps, this useful tool of Android Studio helps you see precisely how your application is designed on-screen, alongside different features. The new and enhanced Layout Inspector in Android Studio 4.0 maximizes on its old version.
Although you can still utilize it for easy view-tree inspection, now it incorporates features like live refreshing. If your device runs Android 10, you can enjoy more features like a 3D representation of what is on-screen and more detailed View attributes.
2. Motion Editor
The MotionLayout API increases the rich capacities of ConstraintLayout for helping Android app developers handle critical widget animation and motion in their applications. Now they can simply use this API with the new Motion Editor, an interface for making, editing, and previewing MotionLayout animations.
You no more need to make and change critical XML files as the Motion Editor creates them for you, with assistance for editing constraint sets, keyframes, transitions, and view attributes. Just click away to see the code the editor makes. The IDE can simply convert the ConstraintLayout using by developers to MotionLayout.
3. Layout Validation
If you are building for many screen sizes, form factors, and resolutions, you should verify that modifications you make to your UI appear good on every screen you support.
The Layout Validation Window helps you preview layouts on multiple screens and configurations at the same time, so you can simply make sure your app looks best across several devices.
Developer and Profile
1. IntelliJ IDEA 2019.3 Platform Update
The basic Android Studio IDE has been upgraded with enhancements from IntelliJ IDEA 2019.3 and 2019.3.3 releases. These enhancements pay attention to performance and quality improvements across the IDE.
2. Upgraded CPU Profiler UI
The CPU profiler traces recordings and offers a good amount of data regarding your application’s thread activity. CPU recordings in Android Studio are now different from the main profiler timeline and arranged in groups for enabling simpler analysis. You can switch groups up and down, or drag-and-drop different things within a group for extra personalization.
3. Kotlin Android Live Templates
This IntelliJ feature permits you to insert basic constructs into your code by typing easy keywords. Now Android Studio incorporates Android-specific live templates for Kotlin code.
4. Smart Editor Features While Writing Code Shrinking Rules
R8 was launched in Android Gradle plugin 3.4.0 for integrating shrinking, desugaring, optimizing, obfuscating, and dexing, which results in noteworthy performance improvements.
When making R8’s rule files, now Android Studio offers smart editor features like error checking, completion, and syntax highlighting. Moreover, the editor combines with your Android project to offer complete symbol completion for every method, class, and field, and incorporates fast navigation and refactoring.
5. Support of Clangd for C++
Clangd is the primary language assessment engine for developers writing C++. They can use it for code navigation, inspection, completion, and displaying code warnings and errors.
1. Java 8 Language Library Desugaring for all APIs
Earlier Android Gradle plugin version supported different features of Java 8 language for all API levels, through the desugaring procedure. In Android Studio 4.0, this desugaring engine has been maximized for supporting Java language APIs.
2. Build Analyzer
Misconfigured or outdated jobs can lead to longer development times that cause lost productivity and frustration.
The Build Analyzer helps developers understand and identify issues in their development by showing up the plugins and jobs that are accountable for your entire development time and by recommending steps for reducing regressions.
3. Feature-on-Feature Dependencies
Now you can particularize that a Dynamic Feature module relies on another feature module. Being capable of defining this relationship makes sure that your app has the needed modules for unlocking extra functionality, resulting in easy app modularization.
4. Vital Support for Kotlin DSL Script Files
Now Android Studio 4.0 has inbuilt support for Kotlin DSL build script files. Kotlin build scripts provide a complete suite of fast solutions and these are supported by the Project Structure dialog.
5. Options to Enable or Disable Build Features
The Android Gradle plugin has inbuilt assistance for modern libraries and the build features. Nevertheless, you might not require them for each project. In version 4.0 of the plugin, now you can disable individual build features that help optimize build functionality for big projects.
6. Dependencies Metadata
If you develop your app using Android Gradle plugin 4.0, it incorporates metadata that explains the library dependencies that are arranged in your app.
While uploading the app, the Play Console checks this metadata to give alerts for known problems with SDKs and the dependencies used by your app, and, in a few cases, give actionable feedback to fix those problems.
This data is encrypted, compressed by the Google Play signing key, and preserved in your release app’s signing block.
So, these are some of the most interesting features added to the newly released Android Studio 4.0. In case you are using its older version, you can easily upgrade to the latest one.