Google releases Android Studio Giraffe, marking 10 years since the first version

Google releases Android Studio Giraffe, marking 10 years since the first version

Google has released Android Studio “Giraffe”, based on the 2022.3 wave of JetBrains IDEs.

Android Studio Giraffe includes a redesigned user interface intended to be cleaner and less complex, with a simplified main toolbar, a new tool window layout, use of the Inter font rather than a default OS font, and refreshed icons. The new UI is off by default though, and described as a beta and “work in progress effort” when enabled in settings – though when we tried the new UI we found it perfectly usable and generally more legible and less cluttered than before.

Another new feature, Live Edit, lets you see UI changes on a running application without redeploying, which can both save time and improve developer flow as there is less context-switching. The feature does have limitations and is focused on UI changes. It does not support method signature changes, adding new methods, or changing the class hierarchy. However it does work both with the emulator and with physical devices.

Compose Animation Preview is improved in this version with support for new APIs including CrossFade and AnimatedContent. A new debug picker lets the developer set precise values for animation states.

Android Studio Giraffe with the new UI

An updated Device Explorer in this release shows a list of debuggable processes, allowing the developer to kill, force-stop, or attach the debugger to any given process.

A new option to Make Selected Modules has been added to the toolbar, enabling quick build of just one or two modules rather than having to rebuild the whole project to test recently written code.

A hidden but key feature in this release is that Kotlin DSL is now the default for new projects. The DSL is the Gradle build language, and Kotlin DSL replaces Groovy DSL, though Groovy DSK remains supported. According to Gradle Senior Software Engineer Paul Merlin, Kotlin is “an excellent fit for creating a DSL” thanks to its “static type system, concise and expressive syntax, and support for functional programming constructs.” This also means that Android developers can use the same language for both application code and editing Gradle builds. Merlin says that Kotlin DSL is the “default and recommended choice for new projects,” but he adds that “very large projects with complex build logic currently using Groovy DSL are advised to wait to migrate,” because of slower script compilation, though this aspect is set to be improved.

The new JetBrains AI Coding Assistant is not available here because it does not support the Community Edition – which Android Studio is based on. Google does have Studio Bot though, for “an AI-powered conversational experience” Study Bot is in preview and only available to US developers.

Android SDK versions: setting the minimum SDK is a difficult decision for developers

There is the usual difficult decision about which “minimum SDK” of the Android SDK to use. The current version is Android 13; but Android Studio helpfully informs the developer that specifying this SDK means the app will run on only 15 percent of devices. The default is Android 7.0, getting 95.4 percent of devices, but this SDK was released in 2016. Android 14 is in beta, with release expected in the next couple of months. It is not as bad as it first appears, since the minimum SDK (minSdkVersion in the manifest) is distinct from the target SDK (targetSdkVersion). The target SDK defaults to Android 13 but the minimum SDK is a promise of compatibility, so with careful coding it is possible to use new APIs but with a fallback for older versions. From August 31 Google will require a target of Android 13 (API level 33) for new applications to be listed in the Play Store, and a target of Android 11 (API level 30) for updated applications. An SDK upgrade assistant is included in Android Studio.

The first Android Studio was announced at the Google I/O event in 2013 as a customized version of JetBrains IntelliJ Community Edition. This meant that it was a mature IDE from the beginning, and is likely also a factor in the official adoption of Kotlin as the preferred language for Android development, since Kotlin was invented by JetBrains. In 2019 the company declared that Android development was now “Kotlin-first,” meaning that libraries, samples and documentation are done first for Kotlin, though Java (the original Android programming language) is still fully supported, thanks to Kotlin being a JVM (Java Virtual Machine) language. C++ also remains as an option.