Google has released the first stable version of JetPack Compose, its modern UI toolkit for Android, and a new version of Android Studio.
“Today, we’re launching version 1.0 of Jetpack Compose, Android’s modern, native UI toolkit to help you build better apps faster,” Google’s Anna-Chiara Bellini and Nick Butcher explain. “It’s stable, and ready for you to adopt in production. We have been developing Compose in the open with feedback and participation from the Android community for the last two years. As we reach 1.0, there are already over 2000 apps in the Play Store using Compose – in fact, the Play Store app itself uses Compose.”
Google designed JetPack Compose to make it easier for Android developers to create native applications. This positions it somewhat against another Google offering, Flutter, which relies on the Dart programming language, while Compose offers native Kotlin APIs. But both solutions offer declarative UI development tools that make app development quicker and less painful.
“With a fully declarative approach, you just describe your UI, and Compose takes care of the rest,” Google explains. “As app state changes, your UI automatically updates, making it a lot simpler to build UI quickly. Intuitive Kotlin APIs help you build beautiful apps with way less code, and native access to all existing Android code means you can adopt at your own pace. Powerful layout APIs and code-driven UI make it easy to support different form factors, like tablets and foldables, and Compose support is coming for WearOS, home screen widgets, and more.”
JetPack Compose 1.0 works with the latest release of Google’s integrated development environment, Android Studio Arctic Fox, the first release to adopt the new versioning scheme the firm announced in late 2020; Android Studio Arctic Fox is also known as version 2020.3.1. This release includes new Compose-based tools like Compose Preview, which lets developers preview multiple UI components at the same time to see the impact changes across themes, screen and font sizes, and more, and Deploy Preview, which enables running Compose code snippets directly to a device or emulator for testing. Google also added Compose support to the Android Studio Layout Inspector and added Live Editing of literals for observing changes instantly without needing app compilation.
For those interested in JetPack Compose, Google has published a roadmap for future improvements, along with an extensive collection of resources that include a tutorial, documentation, hands-on code labs, videos, API usage samples, and more.