Android Studio 4.0 has been released. Highlights of this release include the new motion editor; the build analyzer, which can be used to analyze why builds are slow. At the same time, the CPU profiler user interface is overhauled to provide more intuitive workflow and simple thread parallel analysis. On the other hand, the layout inspector has been improved. Now it can provide real-time data of application UI and debug device content more accurately.
New motion editor
MotionLayout APIExpandedConstraintLayout
Rich functions can help Android develop and manage complex motion and widget animation of applications. In Android Studio 4.0, the new motion editor makes this The API is easier to use, and the editor is used to create, edit, and PreviewMotionLayout
A powerful interface for animation.
Developers no longer need to create and modify complex XML files, and the motion editor generates and supports editing constraint sets, transitions, keyframes, and view attributes. Moreover, it has been used beforeConstraintLayout
The IDE can easily convert it toMotionLayout
。
Improve layout inspector
This version improves the layout inspector. By accessing the latest data in the running application and providing ideas to solve resource problems, developers can debug the UI more intuitively.
If you deploy to a device running API 29 or later, you can also access other functions, such as the dynamic layout hierarchy updated as the view changes, the detailed view properties, and the 3D model of the user interface running the application in real time.
Layout verification
when developing applications with multiple screen sizes and resolutions, it is necessary to verify that the changes made to the UI are adapted on each screen supported. Use
Improve CPU profiler UI
The CPU analyzer is designed to provide thread activity related to applications and track and record rich relevant information. In Android Studio 4.0, CPU records are now separated from the main profiler timeline and organized by groups to simplify analysis. You can move groups up and down, or drag and drop individual items in groups into other combinations.
Now you can also use navigation shortcuts to easily move data for fine zooming and panning, such as using the w / A / S / D key operation. In addition, the system tracking UI has been redesigned, and the events have unique colors for better visual differentiation. Threads are sorted to show the busy threads first.
Intelligent editor function
R8 is a tool to improve application construction performance. Now when creating rule files for R8, you can use the intelligent editor function provided by this version, which can complete functions such as syntax highlighting, auto completion and error checking. This intelligent function can also be integrated with Android project, providing complete symbol completion for all classes, methods and fields, and includes quick navigation and refactoring functions.
Android Studio 4 also initially supported Kotlin DSL script files, enabled clangd as the main language analysis engine for C development, and a range of other improvements, as described above:
https://android-developers.googleblog.com/2020/05/android-studio-4.html
User comments