[null,null,["最后更新时间 (UTC):2025-08-01。"],[],[],null,["# Set up your development environment\n\nTo get started developing for Android XR, use the latest Canary build of\n[Android Studio](/studio/preview), which includes new tools and updates optimized for Android\nXR.\n| **Note:** Ensure you are using the latest Canary build of Android Studio. Other versions might not include Android XR tools.\n\nNew features included in this version of Android Studio are:\n\n- Android XR Emulator\n- Addition of XR support in the Layout Inspector\n- XR Project template\n\nSystem Requirements for Android XR Emulator\n-------------------------------------------\n\n**For macOS:**\n\n- **OS**: macOS 13.3 or later.\n- **CPU/GPU**: Apple Silicon (M1 chip or newer)\n- **RAM/VRAM**: 16 GB or higher\n\n**For Windows:**\n\n- **OS**: Windows 11 or later.\n- **CPU**: Intel 9th generation or later, or AMD Ryzen 1000-series or later.\n- **RAM**: 16 GB or higher\n- **GPU**: NVIDIA GeForce 10 series or later, or AMD Radeon RX 5000 series or later.\n- **VRAM**: 8 GB or higher\n- **BIOS Settings**: VMX CPU extensions must be enabled in your computer's BIOS\n\n| **Note:** You can check if the VMX CPU extensions are already enabled by attempting to run the 2D Android Emulator. If it runs successfully, no BIOS changes are needed.\n\nInstall and configure Android Studio for XR development\n-------------------------------------------------------\n\nComplete the following steps to download Android Studio and set up your\ndevelopment environment:\n\n1. Make sure to close any versions of Android Studio you already have\n installed.\n\n2. Download the latest Canary build of [Android Studio](/studio/preview), extract it into\n your preferred location, and launch the application.\n\n3. Follow the installation instructions in the wizard.\n\n4. In the **Welcome to Android Studio** dialog, click **More Actions** , and\n select **SDK Manager**.\n\n5. In the **Android SDK** page, click the **SDK Tools** tab and select the\n following tools to install:\n\n - Android SDK Build-Tools\n - Android Emulator\n - Android SDK Platform-Tools\n - Layout Inspector for API 31 - 36\n\n | **Note:** If you had a previous version of Android Studio installed, you may need to recheck these boxes, and click **Apply** to download the latest updates.\n6. Under the **SDK Platforms** tab, do the following:\n\n 1. Select the **Show Package Details** checkbox to see all the options.\n 2. Select the **Google Play XR ARM** system image (macOS) or **Google Play\n XR Intel x86_64** (Windows).\n\n 1. Click **Apply** to make the updates, and then click **OK**.\n 2. Allow all the installation steps to complete, then click **Finish**.\n\nCreate an Android XR project\n----------------------------\n\nFollow these steps to create an Android XR project in Android Studio or extend\nan existing project to XR.\n\n1. In the **Welcome to Android Studio** window, do one of the following:\n\n 1. If you're creating a new XR app, click **New Project** and go to the next step.\n 2. If you're spatializing an existing app, click **Open** to select your project, then skip to the next step Create a new Android Virtual Device for the Android Emulator. (For help with spatializing your existing app for Android XR, read [Bring your Android app into 3D with XR](/develop/xr/jetpack-xr-sdk/add-xr-to-existing))\n\n2. In the **XR** category, select the **Basic Headset Activity** template and\n click **Next**.\n\n3. On the next screen you can choose a name for your project. You can leave the\n default settings in place. Then click **Finish**.\n\n4. Explore the code provided in the template. Check out our [development\n guide](/develop/xr/jetpack-xr-sdk/develop-ui) and [reference documentation](/jetpack/androidx/releases/xr-compose).\n\nCreate a new Android Virtual Device for the Android Emulator\n------------------------------------------------------------\n\nThe Android XR Emulator is a specialized version of the Android emulator\ndesigned for XR app development. It lets you test and debug your Extended\nReality (XR) applications within the familiar Android Studio environment.\n| **Caution:** In rare cases, using the emulator can result in system freezes or crashes on some Windows configurations. Please ensure all data is saved before running the emulator. As a workaround, [enable WHPX](/studio/run/emulator-acceleration#vm-windows-whpx). See [release notes](/studio/preview/features) for more known issues.\n\nTo use the Android XR Emulator, you'll have to create a new virtual device.\nFollow these steps to do so:\n\n1. In Android Studio, click **Tools \\\u003e AVD Manager**, and follow the\n instructions to create a new Android Virtual Device (AVD).\n\n2. In the **Add Device** window, under **Form Factor** , select the **XR**\n option, then select **XR Device** in the **Name** list. Click **Next**.\n\n3. In the next tab (**Configure Virtual Device** ), under **System Image**,\n select the most recent Android XR system image that is compatible with your\n system.\n\n4. Click **Finish**.\n\n5. To start the emulator, click the **Run** button in Device Manager.\n\n The emulator opens in a separate window.\n\n6. To launch your app in the emulator, click the **Run** icon in Android\n Studio.\n\nFor details on using the emulator and other new XR tools, read [Android\nStudio Tools for XR](/develop/xr/jetpack-xr-sdk/studio-tools).\n\nEnable Usage Statistics to help improve Android Studio\n------------------------------------------------------\n\nBecause this is a developer preview version of Android Studio, many of these\nfeatures are still under development. Consider enabling usage statistics and\nsending feedback to help us improve these tools.\n\nTo enable Usage Statistics:\n\n1. Click **Settings \\\u003e Appearance \\& Behavior \\\u003e System Settings \\\u003e Data Sharing**.\n2. Select **Send usage statistics to google**."]]