[null,null,["最后更新时间 (UTC):2025-08-17。"],[],[],null,["# AI features in Studio Labs\n\nWe've heard feedback that developers want to access AI features in stable\nchannels as soon as possible. You can now discover and try out the latest AI\nexperimental features through the **Studio Labs** menu in the Settings menu\nstarting with Narwhal stable release.\n\nYou can get a first look at AI experiments, share your feedback, and help us\nbring them into the IDE you use everyday. Go to the Studio Labs tab in Settings\nand enable the features you would like to start using. These AI features are\nautomatically enabled in canary releases and no action is required.\nAI features in Studio Labs\n\nStudio Labs features\n--------------------\n\n### Compose preview generation with Gemini\n\nGemini can automatically generate Jetpack Compose preview code saving you\ntime and effort. You can access this feature by right-clicking within a\ncomposable and navigating to **Gemini \\\u003e Generate Compose Preview** or\n**Generate Compose Preview for this file**, or by clicking the link in an\nempty preview panel. The generated preview code is presented in a diff view\nthat lets you to quickly accept, edit, or reject the suggestions, providing\na faster way to visualize your composables.\nCompose Preview generation with Gemini\n\n### Image attachment in Gemini\n\nYou can now attach image files and provide additional information along with\nyour prompt. For example: you can attach UI mock-ups or screenshots to tell\nGemini context about your app's layout. Consequently, Gemini can generate\nCompose code based on a provided image, or explain the composables and data flow\nof a UI screenshot. To learn more, see\n[Attach an image to your query](/studio/gemini/attach-image).\nImage attachment \\& preview generation using Gemini in Android Studio\n\n### @File context in Gemini\n\nYou can now attach your project files as context in chat interactions with\nGemini in Android Studio. This lets you quickly reference files in your prompts\nfor Gemini. In the Gemini chat input, type `@` to bring up a file completion\nmenu and select files to attach. You can also click the **Context** drop-down to\nsee which files were automatically attached by Gemini. This gives you more\ncontrol over the context sent to Gemini. To learn more, see\n[Attach a file to your query](/studio/gemini/attach-file).\n@File context in Gemini\n\n### Transform UI with Gemini\n\nTransform UI code within the Compose Preview environment using natural language\ndirectly in the preview. To use it, right-click in the Compose Preview and\nselect **Transform UI With Gemini** . Then enter your natural language requests,\nsuch as \"Center align these buttons,\" to guide Gemini in adjusting your layout\nor styling, or select specific UI elements in the preview for better context.\nGemini will then edit your Compose UI code in place, which you can review and\napprove, speeding up the UI development workflow. To learn more, see\n[Transform UI](/studio/gemini/transform-ui).\n\n|-------------------------------------------|-----------------------------------------------------------------|\n| Accessing 'Transform UI with Gemini' menu | Applying a natural language transformation to a Compose preview |"]]