[ Web Proxy ]
URL:
Viewing: https://developer.android.com/develop/ui/compose/tooling/iterative-development [Back]  [Original]

Iterative code development  |  Jetpack Compose  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]

Iterative code development Stay organized with collections Save and categorize content based on your preferences.

As a mobile developer, you're often developing your app's UI step by step rather than developing everything at once. Android Studio embraces this approach with Jetpack Compose by providing tools that don't require a full build to inspect, modify values, and verify the final result.

AI-assisted UI iteration

You can use the AI agent in Android Studio to iteratively refine and transform your Compose UI directly from the design preview. Right-click on a Compose Preview and select one of the following AI Actions:

[] Figure 1. Update the UI to match a target image. [] Figure 2. Ask the agent to transform the UI.

Live Edit

Important: This feature is in active development, so you might experience some unstable behavior. In Android Studio Giraffe and higher it requires Jetpack Compose Runtime 1.3.0 or higher and AGP 8.1.0-alpha05 or higher. Google is continuously working to improve this feature and welcomes your feedback. If you find an issue, please report it. Include information from Logcat and a description of the code change you were making. You can also check the list of open issues.

Live Edit is a feature that lets you update composables in emulators and physical devices in real time. This functionality minimizes context switches between writing and building your app, letting you focus on writing code longer without interruption.

Important: The manual mode shortcut was updated to Control+' (Command+' on macOS) in Koala Feature Drop. Previous versions of Android Studio used Control+\ (Command+\ on macOS) as the manual mode shortcut.

Live Edit has three modes:

Live Edit is focused on UI- and UX-related code changes. Live Edit doesn't support changes such as method signature updates, adding new methods, or class hierarchy changes. For more information, see the list of Limitations of Live Edit.

This feature is not a replacement for building and running your app or for Apply Changes. Instead, it's designed to optimize your workflow as you build, deploy, and iterate to develop Compose UI.

The best practice workflow is as follows:

  1. Set up your application so that it can be run.
  2. Live Edit as much as possible until you need to make a change that Live Edit doesn't support, such as adding new methods while the app is running.
  3. After you make an unsupported change, click Run Run
icon [Run icon] to restart your app and resume Live Edit.

Get started with Live Edit

To get started, follow these steps to create an empty Compose Activity, enable Live Edit for your project, and make changes with Live Edit.

Set up your new project

  1. Before you begin, make sure that you have Android Studio Giraffe or higher installed and that the API level of your physical device or emulator is at least 30.

  2. Open Android Studio and select New Project in the Welcome to Android Studio dialog. If you already have a project open, you can create a new one by navigating to File > New > New Project.

  3. Choose the Empty Compose Activity template for Phone and Tablet, and then click Next.

    Template selection in Android Studio [Template selection in Android Studio] Figure 3. Templates you can choose from. For Live Edit, choose Empty Compose Activity.
  4. Complete the New Project dialog with the required information: name, package name, save location, minimum SDK, and build configuration language.

    Example project settings from Step 4 entered in Android Studio [Example project settings from Step 4 entered in Android Studio] Figure 4. Example project settings.
  5. Click Finish.

Enable Live Edit

  1. Navigate to the settings to enable Live Edit.

    • On Windows or Linux, navigate to File > Settings > Editor > Live Edit.
    • On macOS, navigate to Android Studio > Settings > Editor > Live Edit.
  2. Select the Live Edit option and the mode you want to run from the settings.

    In manual mode, your code changes are pushed every time you press Control+' (Command+' on macOS). In manual mode on save, your code changes are applied every time you manually save, using Control+S (Command+S on macOS). In automatic mode, your code changes are applied in your device or emulator as you make your changes.

    Live Edit checkbox UI in Android Studio settings [Live Edit checkbox UI in Android Studio settings] Figure 5. Live Edit settings.
  3. In the editor, open the MainActivity file, which is the entry point for your app.

  4. Click Run UI button [UI button] to deploy your app.

  5. After you turn on Live Edit, the Up-to-date green checkmark appears in the top right of the Running Devices tool window:

    Live Edit green checkmark UI [Live Edit green checkmark UI]

Make and review changes

As you make supported changes in the editor, the virtual or physical test device updates automatically.

For example, edit the existing Greeting method in MainActivity to the following:

@Composable
fun Greeting(name: String) {
    Text(
        text = "Hello $name!",
        Modifier
            .padding(80.dp) // Outer padding; outside background
            .background(color = Color.Cyan) // Solid element background color
            .padding(16.dp) // Inner padding; inside background, around text)
    )
}

Your changes appear instantaneously on the test device, as shown in Figure 6.

Changes to Greeting method applied on a device [Changes to Greeting method applied on a device] Figure 6. Test device displaying Live Edit changes to the Greeting method.

Troubleshoot Live Edit

If you don't see your edits on the test device, Android Studio might have failed to update your edits. Check whether the Live Edit indicator says Out Of Date as shown in Figure 7, which indicates a compilation error. For information about the error and suggestions for how to resolve it, click the indicator.

Live Edit out of date icon [Live Edit out of date icon] Figure 7. Live Edit status indicator.

Limitations of Live Edit

The following is a list of current limitations.

Frequently asked questions about Live Edit

Iterative code development with Compose

Live Edit and Hot Reload for Compose Multiplatform are features that can save you time and increase your productivity as you develop with Compose. However, they serve the needs of different types of development:

While these two features share many technologies within the Compose engine and support many similar use cases, they do not have the same capabilities because they apply to different types of Compose development.

If you are developing an Android app, you should use Live Edit to accelerate your development process. If you are developing a desktop application using Compose Multiplatform, you should use Compose Hot Reload.

Live Edit of literals (deprecated)

Deprecated: Live Edit of literals, an earlier version of Live Edit that is limited to just a few supported types, is deprecated. We recommend using Live Edit instead.

Android Studio can update in real time some constant literals used in composables within previews, emulator, and physical device. Here are some supported types:

Video of the user changing literals in the source code, and the preview
updating
dynamically [Video of the user changing literals in the source code, and the preview updating dynamically]

You can view constant literals that trigger real time updates without the compilation step by enabling literal decorations through the Live Edit of literals UI indicator:

Enabling Live Editing of
Literals [Enabling Live Editing of Literals]

Note: The Live Edit of literals UI indicator is be displayed next to Code/Split/Design as long as there is an active connection to the running app on an emulator or physical device.

Apply Changes

Apply Changes lets you update code and resources without having to redeploy your app to an emulator or physical device (with some limitations).

Whenever you add, modify, or delete composables, you can update your app without having to redeploy it by clicking on the Apply Code Changes button:

User clicking the "apply changes"
button [User clicking the "apply changes" button]

Preview and debug animations
Editor actions

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-17 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-17 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page