[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Android Studio Meerkat | 2024.3.1 (March 2025)\n\nThe following are new features in Android Studio Meerkat.\n\nCompose Preview enhancements\n----------------------------\n\nAndroid Studio Meerkat includes some optimizations of Compose Preview to\nimprove your workflow:\n\n1. **Enhanced zoom**: Enjoy smoother and more responsive zooming in your Compose Previews.\n2. **Previews collapsible groups**: Organize your preview surface more effectively! Collapse groups of composables under their titles, reducing clutter and making it easier to focus on specific components.\n3. **View modes**: To streamline your preview experience, Grid mode is the default view, Gallery mode is accessed by right-clicking preview, and List view has been removed. This provides a clearer and more organized way to view your composables.\n\nThese enhancements make it easier than ever to build and iterate on your\nCompose UIs.\nCollapsible groups in Compose Previews.\n\nKMP Shared Module integration with Android applications\n-------------------------------------------------------\n\nAndroid Studio now includes a new module template for adding shared logic to\nyour app using Kotlin Multi-Platform (KMP). To try out this feature, follow\nthese steps to create a KMP Shared Module in a newly created Android app:\n\n1. Make sure you're using the latest version of Android Studio Meerkat and that your app uses the latest version of Android Gradle Plugin.\n2. Open Android Studio and create a new Android project with the *Empty\n Activity* template.\n3. Switch from the **Android view** to the **Project view** to access the project structure.\n4. Click the **New** button in the **Project view** and select *Kotlin\n Multiplatform Module* from the options. Choose *Shared Module* as the type and keep the default settings.\n5. Open the `build.gradle.kts` file in the Android app directory and add a dependency on the shared module.\n6. In the shared module, edit the `Platform.android.kt` file and add the\n following line of code:\n\n actual fun platform() = \"Android from Shared KMP Module\"\n\n7. Open the `MainActivity.kt` file in the Android app directory and modify it to\n call the `platform()` function from the shared module.\n\n8. Build the project and run the Android application. You should see the\n message, \"Hello Android from Shared KMP Module!\" displayed on the screen.\n\nThese shared modules contain shared business logic that can be used by both\nAndroid and iOS platforms.\n\nUpdated UX for adding virtual and remote devices to Device Manager\n------------------------------------------------------------------\n\nAndroid Studio improves the UX when creating a local virtual device or adding a\ndevice from [Android Device Streaming](/studio/run/android-device-streaming).\n\nTo get started, click the **+** button from the Device Manager, and select either\n**Create Virtual Device** or **Select Remote Devices**.\n\nWhen creating a new virtual device, new filters and recommendations make it\neasier to create a device configuration that fits your needs and\nperforms the best on your workstation.\nIdentify and select the optimal system image for your virtual device using the UI.\n\nSimilarly, when selecting remote devices from Android Device Streaming, new\nfilters make it easier to find and select the devices you need. You now only\nneed to click the Firebase button at the top of the Device Manager window to\nselect the Firebase project you want to use for Android Device Streaming.\n\nNew Gemini in Android Studio features\n-------------------------------------\n\nAndroid Studio Meerkat introduces new features that use Gemini to help you be\nmore productive. To use these features, enable sharing code context with Gemini\nin your current project.\n\nUse the following links to learn more about these features:\n\n- [Analyze crash reports](/studio/preview/gemini/deploy#crash-reports)\n- [Generate unit test scenarios](/studio/preview/gemini/deploy#unit-test-gen)\n\nUpdated Build menu and actions\n------------------------------\n\nWe made the following changes to the build actions and the Build menu to help\nmake it easy to build exactly what you want as you work on projects in\nAndroid Studio:\n\n- **Added a new `Build 'run-configuration-name' Run Configuration` action:** This action builds the currently selected run configuration. For example, if you have the `:app` run configuration selected, the action will build and assemble `app`. If you have recently run a test on a device the action will build those tests.\n- **Made `Build 'run-configuration-name' Run Configuration` the default Build\n action:** To better match developer's intent, both the toolbar button and the shortcut \u003ckbd\u003eControl/Command+F9\u003c/kbd\u003e now execute the new `Build\n run-configuration-name Run Configuration` action.\n- **Reordered build actions:** We placed the new `Build run-configuration-name` action at the top of the Build menu, next the Compile actions, and next the \"Assemble ...\" actions (previous \"Make ...\" actions). We also renamed the \"Rebuild Project\" action to \"Clean and Assemble Project with Tests\" to more clearly reflect what the action does.\n- **Used verbs that match what the build actions actually do:** In addition to \"Build\" and \"Compile\" actions, we renamed `Make Project` to `Assemble Project`. We also introduced a new `Assemble Project with Tests` action to assemble test components as well.\n\nGoogle Play SDK Insights: Deprecated SDK warnings\n-------------------------------------------------\n\nSDK authors can now indicate when an\n[SDK has been deprecated](https://support.google.com/googleplay/android-developer/answer/15321477)\nand mention alternative SDKs to use instead. If any of the SDKs used by your\napp have been deprecated by their authors, you'll see corresponding warnings in\nAndroid Studio along with information about other SDKs that can be used instead."]]