Android Studio Chipmunk Brings Animation Preview, CPU Profiler, and More

The latest version of Google’s IDE for Android application development, Android Studio Chipmunkincludes a new Compose animation preview, CPU profiler, and expanded build analyzer.

The new Compose Animation Preview aims to simplify the creation of animations based on Jetpack Compose for developers. Currently it supports animations using AnimatedVisibilitywhich allows to control the appearance and disappearance of a composable, and updateTransition. updateTransition can be used to create transitions between given states changing several properties at the same time, for example the opacity and size of a composable. These are just two of the many animations available, but Google says they will introduce support for more of them in the future.

Using Animation Preview, developers can pause an animation, loop it, fast forward it, or slow it down. Additionally, you can inspect the current value of animated properties at any time. To activate the preview of a composable, you can use the tool @Preview annotation to wrap it in a new ad hoc composable, as in the following example:

@Preview
@Composable
fun ComposablePreview() {
    MyComposable()
}

Android Studio Chipmunk also includes a new UI Flicker Detector to simplify troubleshooting UI issues such as slow rendering or skipping animation frames. the new flicker/jank detector exposes frame lifecycle information in system traces, showing which frames belong to each of the possible states, which can help you understand how long it took the GPU and application to render a frame, etc UI analysis is to identify which images took longer to render to understand what factor can be the cause.

The build analyzer in Android Studio Chipmunk has been extended to identify cases where all of your dependencies support AndroidX natively and you don’t need to force migrate them to AndroidX. This will typically reduce build times by 5-10%. According to Google, the vast majority of Android Studio projects still use the Jetifier flag although most libraries already support AndroidX natively, making the forced migration step unnecessary.

Finally, Android Studio Chipmunk is also updating its underlying IntelliJ platform, adopting IntelliJ 2021.2, with a new project-wide analysis tool that tracks errors before compilation; new IDE actions such as code reformatting and import optimization; and a new one parcel search utility.

Comments are closed.