Google launches Android Studio 4.0 with Jetpack Compose

8,545

Google has released Android Studio 4.0 Canary including an early developer preview of Jetpack Compose. The company released extended APIs for Android Jetpack and Jetpack Compose.

The latest unbundled toolkit- Jetpack Compose is designed to simplify the UI development and accelerate Android app development, by blending a reactive programming model with the Kotlin language in a way that takes inspiration from Flutter.

The IDE for Android Studio 4.0 includes code completion, live previews, Java 8 library desugaring, motion editor, full support for KTS files, and Kotlin live templates and a sample app; all this has been rolled into the latest Android Studio Canary 4.0 release.

Android Studio now includes support for using a number of Java 8 language APIs without requiring a minimum API level for your app.

Through a process called desugaring, the DEX compiler, D8, in Android Studio 3.0 and higher already provided substantial support for Java 8 language features (such as lambda expressions, default interface methods, try with resources, and more).

In Android Studio 4.0, the desugaring engine has been extended to be able to desugar Java language APIs. This means that you can now include standard language APIs that were available only in recent Android releases (such as java.util.streams) in apps that support older versions of Android.

The Android Gradle plugin now supports Kotlin DSL build script files (*.kts). When used with Android Studio, certain IDE features, such as the Project Structure dialog and build script quick fixes, now also support reading and writing to Kotlin build script files.

Android Studio now provides smart editor features when you open ProGuard rules files, such as syntax highlighting, code completion, and error checking. The editor also integrates with your Android Studio project to provide full symbol completion for all classes, methods, and fields, and includes quick navigation and refactoring.

Android Studio now includes a visual design editor for the MotionLayout layout type, making it easier to create and preview animations.

The Motion Editor provides a simple interface for manipulating elements from the MotionLayout library that serves as the foundation for animation in Android apps. In previous releases, creating and altering these elements required manually editing constraints in XML resource files. Now, the Motion Editor can generate this XML for you, with support for start and end states, keyframes, transitions, and timelines.

Android Studio now includes Android live templates for your Kotlin classes. For example, you can now type toast and press the Tab key to quickly insert a Toast. For a full list of available live templates, click File > Settings from the menu bar (or Android Studio > Preferences on macOS) and navigate to Editor > Live Templates.

Benchmarking is made available now as a release candidate, making it easier to measure the performance of the applications.

Viewbinding has been added to the Android Jetpack. It facilitates access to the View from your code and is a type-safe solution rendering minimal build-time impact. It eliminates the need for annotation processors and findViewById().

The CameraX is meant to simplify the development experience and let developers focus on the application by resolving the differences between many devices in the Android ecosystem. Devices such as Samsung, Oppo,  Xiaomi, Motorola, LG have already unified behind CameraX and will hit beta in December.

Although these all are just iterative updates while several bigger improvements are expected to hit the market in I/O 2020.

Both Android Studio 4.0 and Jetpack Compose support are available on Mac, Windows, Chrome OS, and Linux.

Developers can download Android Studio 4.0 from the download page. If you are using a previous release of Android Studio, you can simply update to the latest version of Android Studio.

Rapid Mobile uses cookies, tokens, and other third party scripts to recognise visitors of our sites and services, remember your settings and privacy choices, and - depending on your settings and privacy choices - enable us and some key partners to collect information about you so that we can improve our services and deliver relevant ads.

 

By continuing to use our site or clicking Agree, you agree that Rapid Mobile and our key partners may collect data and use cookies for personalised ads and other purposes, as described more fully in our privacy policy.

 

You can change your settings at any time by clicking Manage Settings or by visiting our Privacy Centre for more detailed information.

 

Privacy Settings saved!
Cookie Services

When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

These cookies are necessary for the website to function and enable essential services and functonality, including identify verification, service continuity and site security. Opt out is not availabe.

Essential Session management cookies for logged in users
  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

For perfomance reasons we use Cloudflare as a CDN network. This saves a cookie "__cfduid" to apply security settings on a per-client basis. This cookie is strictly necessary for Cloudflare's security features and cannot be turned off.
  • __cfduid

Used by Spamshield to stop spam signups
  • _wpss_h_
  • _wpss_p_

NewsWire Service
  • BIGipServerwidget2_www_http

Decline all Services
Accept all Services