הגדרות BIOS: צריך להפעיל את תוספי המעבד VMX ב-BIOS של המחשב
התקנה והגדרה של Android Studio לפיתוח XR
כדי להוריד את Android Studio ולהגדיר את סביבת הפיתוח, פועלים לפי השלבים הבאים:
חשוב לסגור את כל הגרסאות של Android Studio שכבר מותקנות במחשב.
מורידים את גרסת ה-Canary האחרונה של Android Studio, מחלצים אותה למיקום הרצוי ומפעילים את האפליקציה.
פועלים לפי הוראות ההתקנה באשף.
בתיבת הדו-שיח Welcome to Android Studio (ברוכים הבאים ל-Android Studio), לוחצים על More Actions (פעולות נוספות) ובוחרים באפשרות SDK Manager (כלי לניהול SDK).
בדף Android SDK, לוחצים על הכרטיסייה SDK Tools ובוחרים את הכלים הבאים להתקנה:
Android SDK Build-Tools
אמולטור Android
Android SDK Platform-Tools
כלי לבדיקת פריסות ל-API ברמה 31 עד 36
בכרטיסייה SDK Platforms (פלטפורמות SDK), מבצעים את הפעולות הבאות:
מסמנים את תיבת הסימון הצגת פרטי החבילה כדי לראות את כל האפשרויות.
בוחרים את קובץ האימג' של המערכת Google Play XR ARM (ב-macOS) או Google Play
XR Intel x86_64 (ב-Windows).
לוחצים על אישור כדי להחיל את העדכונים, ואז לוחצים על אישור.
מחכים עד שכל שלבי ההתקנה יסתיימו ולוחצים על סיום.
יצירת פרויקט Android XR
כדי ליצור פרויקט Android XR ב-Android Studio או להרחיב פרויקט קיים ל-XR, פועלים לפי השלבים הבאים.
בחלון Welcome to Android Studio (ברוכים הבאים ל-Android Studio), מבצעים אחת מהפעולות הבאות:
אם אתם יוצרים אפליקציית XR חדשה, לוחצים על New Project ועוברים לשלב הבא.
אם אתם מוסיפים מרחביות לאפליקציה קיימת, לוחצים על Open כדי לבחור את הפרויקט, ואז מדלגים לשלב הבא: יצירת מכשיר וירטואלי חדש של Android עבור Android Emulator. (לקבלת עזרה בהוספת תכונות מרחביות לאפליקציה קיימת ל-Android XR, אפשר לקרוא את המאמר הוספת תכונות מרחביות לאפליקציה ל-Android באמצעות XR)
בקטגוריה XR, בוחרים בתבנית Basic Headset Activity ולוחצים על Next.
במסך הבא אפשר לבחור שם לפרויקט. אפשר להשאיר את הגדרות ברירת המחדל. ואז לוחצים על סיום.
יצירת מכשיר וירטואלי חדש של Android עבור Android Emulator
האמולטור של Android XR הוא גרסה מיוחדת של אמולטור Android
שמיועדת לפיתוח אפליקציות XR. הוא מאפשר לכם לבדוק ולנפות באגים באפליקציות של מציאות מורחבת (XR) בסביבה המוכרת של Android Studio.
כדי להשתמש באמולטור Android XR, צריך ליצור מכשיר וירטואלי חדש.
כדי לעשות זאת, פועלים לפי השלבים הבאים:
ב-Android Studio, לוחצים על Tools > AVD Manager ופועלים לפי ההוראות ליצירת מכשיר וירטואלי חדש של Android (AVD).
בחלון הוספת מכשיר, בקטע גורם צורה, בוחרים באפשרות XR ואז בוחרים באפשרות מכשיר XR ברשימה שם. לוחצים על הבא.
בכרטיסייה הבאה (Configure Virtual Device), בקטע System Image, בוחרים את תמונת המערכת העדכנית ביותר של Android XR שתואמת למערכת שלכם.
לוחצים על סיום.
כדי להפעיל את האמולטור, לוחצים על הכפתור Run (הפעלה) ב-Device Manager (ניהול מכשירים).
האמולטור ייפתח בחלון נפרד.
כדי להפעיל את האפליקציה באמולטור, לוחצים על הסמל הפעלה ב-Android Studio.
מכיוון שזו גרסת טרום-השקה למפתחים של Android Studio, הרבה מהתכונות האלה עדיין בפיתוח. כדאי להפעיל את נתוני השימוש ולשלוח משוב כדי לעזור לנו לשפר את הכלים האלה.
כדי להפעיל את נתוני השימוש:
לוחצים על הגדרות > מראה והתנהגות > הגדרות מערכת > שיתוף נתונים.
בוחרים באפשרות שליחת נתוני שימוש אל Google.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-01 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-01 (שעון UTC)."],[],[],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**."]]