BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Android Studio Flamingo Brings Live Edit for Composable, Improved Build Toolchain, and More

Android Studio Flamingo Brings Live Edit for Composable, Improved Build Toolchain, and More

The latest stable release of Android Studio, dubbed Flamingo, brings Live Edit for Composable UIs, new app inspection features, updated IntelliJ, and more.

Live Edit is a new experimental feature that enables pushing code changes directly to an attached device or emulator to update an app's composables in real time. This reduces context switching and optimizes the build-deploy-iterate cycle for UI programming. Live Edit can only apply changes to composable function bodies and does not support method signature updates, adding new methods, or class hierarchy changes.

Live Edit can be applied manually when a file is saved or automatically for each change. Occasionally, Live Edit can make an app crash, in which case a complete app re-deploy is required. Likewise, if you change non-composable functions, the latest code might not be invoked at times. In those cases you will also need to run the app again.

Other new UI-related features included in Android Studio Flamingo are support for previewing themed app icons with different wallpapers, and dynamic color preview.

Android Studio Flamingo also brings a number of new features in the build toolchain. The build analyzer is now able to group tasks by categories, which can be sorted by duration to highlight which categories have a larger impact on build time, for example, Manifest, Android Resources, Kotlin, Dexing, etc.

SDK extensions can be now scanned to detect any issues using to a new linter. SDK extensions are a mechanism enabling system components to be updated with critical bug fixes and other improvements as needed. Additionally, profiling gets one-click automated support for building and running a non-debuggable build, which prevents profiling a debug build unless expressly desired.

As a last note about the build system, Android Studio Flamingo adopts Gradle plugin 8, which brings both improvements and breaking changes, such as the removal of the Transform API. The Transform API was typically used for instrumenting compiled classes to add traces, custom logging, performance analysis and so on. Developers will need to migrate to use replacement APIs, including the Instrumentation API, which can be used for transforming bytecode, and the Artifacts API, which enables adding new classes to an app.

A very useful feature for testing app network behavior is network traffic interception and modification. This will allow you to modify a network response before it reaches your app so you can test how your app behaves when getting distinct status codes, headers, or payloads. Furthermore, Android Studio Flamingo offers an improved integration with Crashlytics so you can more easily discover, investigate, and reproduce issues.

As a final note about the new Android IDE, it is worth mentioning the adoption of IntelliJ 2022.2 , which brings IDE performance improvements, specifically when using Kotlin, enhanced rendering performance on macOS, and more.

About the Author

Rate this Article

Adoption
Style

BT