Live Edit in Jetpack Compose

Updated 30 June 2022

Save

In this blog, we are going to learn about “Live edit ”. Similar to the Android Studio Dolphin Beta, the Electric Eel Canary version has a new Jetpack Compose feature. Developers can inspect code changes in real-time in the Compose Preview, the emulator, or the physical device with the new Live Edit capability included in this edition.

Live Edit is an opt-in feature that developers will have to enable in the Android Studio setting.

How to Enabled Live Edit in Android Studio

First, we are installing the android studio, after installing the Android Studio Electric Eel Canary version, live editing must be enabled in the android studio settings. So open Android Studio and go to Preferences, pick Editor, then select Live Edit from the options menu and the project needs to be rebuild before being executed on a real device or an emulator. so that is the proceeder of live edit enabled in the android studio. As we are seeing in the attached screenshot.

Live literal editing

By turning on literal decorations in the Live Edit of Literals UI indication, you can observe constant literals that cause real-time updates without the compilation step. The Electric Eel Canary builds’ Live Edit functionality is experimental but therefore there are some known problems and restrictions. While we work to make the function better, we welcome your input. A list of unresolved concerns is also available here.

Live Edit

Starting with Android Studio, you can accelerate your compose development experience by using live edit. Starting with Android Studio Electric Eel, you can accelerate your Compose development experience by using Live Edit. The functionality allows you to see the effect of updates to composable in real-time by automatically updating the Preview. 

Live Edit on emulator
Live Edit on Preview

As we are seeing in the attached images. we are changing the text and background color in the composble function so these changes automatically change in emulate and device

Conclusion

In this article, you can see the live edit feature in the jetpack compose by using the Electric Eel Canary version of android studio.

I hope this article provides you with sufficient information about the live edit feature so please try it.

Also, visit the link for additional information on live edit.

Thank you for reading this article and you can also check other blogs from here for more knowledge.

Happy learning 🙂

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home