با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
از شبیه ساز اندروید برای آزمایش سناریوهای واقعیت افزوده بدون دستگاه فیزیکی استفاده کنید. شبیه ساز Android به شما امکان می دهد برنامه های ARCore را در یک محیط مجازی با دستگاه شبیه سازی شده ای که کنترل می کنید اجرا کنید.
در Android Studio با کلیک روی Tools > Device ManagerDevice Manager را باز کنید.
Create Device ، در بالای پانل مدیریت دستگاه کلیک کنید.
نمایه سخت افزار تلفن مورد نظر خود را انتخاب یا ایجاد کنید و Next انتخاب کنید.
یک تصویر سیستم x86 یا x86_64 را که دارای API سطح 27 یا بالاتر است انتخاب کنید و Next انتخاب کنید.
در حالی که دستگاههای فیزیکی ARCore در سطح API 24 یا بالاتر پشتیبانی میشوند، پشتیبانی شبیهساز Android به API سطح 27 یا بالاتر نیاز دارد.
فقط معماریهای شبیهساز اندروید مبتنی بر x86 پشتیبانی میشوند. معماری های دیگری مانند arm64-v8a ، armeabi-v7 ، در حال حاضر پشتیبانی نمی شوند.
بررسی کنید که دستگاه مجازی شما به درستی پیکربندی شده است:
روی Show Advanced Settings کلیک کنید.
مطمئن شوید که Camera Back روی VirtualScene تنظیم شده است.
برای ایجاد AVD خود روی Finish کلیک کنید.
برنامه خود را اجرا کنید
یک برنامه ARCore را روی یک دستگاه مجازی با پشتیبانی AR در شبیه ساز آزمایش کنید. برای این کار، میتوانید دستورالعملهای Android Studio را برای اجرای یک برنامه در شبیهساز اندروید دنبال کنید.
سرویسهای Google Play را برای AR بهروزرسانی کنید
نسخه Google Play Services for AR در شبیه ساز احتمالا قدیمی است. برای به روز رسانی این دستورالعمل ها را دنبال کنید:
آخرین Google_Play_Services_for_AR_1.50.0_x86_for_emulator.apk را از صفحه انتشارات GitHub دانلود کنید.
APK دانلود شده را در هر AVD که می خواهید استفاده کنید نصب کنید:
AVD مورد نظر را راه اندازی کنید، سپس APK دانلود شده را از پوشه سیستم خود (به عنوان مثال، Downloads ) روی شبیه ساز در حال اجرا بکشید، یا آن را با استفاده از adb در حالی که دستگاه مجازی در حال اجرا است، نصب کنید:
این مراحل را برای هر AVD دیگری که میخواهید استفاده کنید، تکرار کنید.
صحنه مجازی را کنترل کنید
هنگامی که برنامه شما به ARCore متصل میشود، پوششی را میبینید که نحوه کنترل دوربین و نوار وضعیت را در زیر پنجره شبیهساز توضیح میدهد.
دوربین مجازی را حرکت دهید
برای دسترسی به کنترل های حرکت دوربین، Shift فشار داده و نگه دارید. برای جابجایی دوربین از کنترل های زیر استفاده کنید:
اقدام
چه باید کرد
به چپ یا راست حرکت کنید
Shift را نگه دارید + A یا D را فشار دهید
به سمت پایین یا بالا حرکت کنید
Shift را نگه دارید + Q یا E را فشار دهید
به جلو یا عقب حرکت کنید
Shift را نگه دارید + W یا S را فشار دهید
جهت دستگاه را تغییر دهید
Shift + حرکت ماوس را نگه دارید
برای بازگشت به حالت تعاملی در شبیه ساز، Shift را رها کنید.
برای موقعیت یابی دقیق تر دستگاه، از تب Virtual Sensors در Extended Controls استفاده کنید.
تصاویر افزوده شده را به صحنه اضافه کنید
برای آزمایش تصاویر افزوده شده، تصاویر را در محیط شبیه سازی شده شبیه ساز بارگیری کنید.
برای افزودن یا تغییر Scene images از برگه Camera در Extended controls استفاده کنید. دو مکان تصویر وجود دارد، یکی روی دیوار و دیگری روی میز.
برای مشاهده این مکانهای تصویر در صحنه، شبیهساز خود را راهاندازی کنید، سپس دوربین را از طریق در پشت موقعیت شروع دوربین به قسمت اتاق غذاخوری ببرید.
نکات عیب یابی
اگر برنامه ARCore شما راهاندازی شد و پیام «این دستگاه AR پشتیبانی نمیکند» را مشاهده کردید، ویرایش تصویر سیستم خود را بررسی کنید. مطمئن شوید که از API Level 27 Revision 4 یا بالاتر استفاده می کنید.
اگر برنامه ARCore شما هنگام راهاندازی دوربین را باز نمیکند، مطمئن شوید که Camera Back روی VirtualScene تنظیم شده است، همانطور که در مراحل پیکربندی بالا توضیح داده شد.
اگر برنامه ARCore شما با پیام خطای "Failed to create AR session" باز نشد، گزارش برنامه را بررسی کنید. اگر یک java.lang.UnsatisfiedLinkError با پیامی حاوی /lib/arm/libarcore_c.so" is for EM_ARM (40) instead of EM_386 (3) ، ممکن است نسخه اشتباهی از خدمات Google Play را برای AR apk نصب کرده باشید. یک دستگاه مجازی جدید ایجاد کنید و x8 را نصب کنید.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eUse the Android Emulator to test AR scenarios without a physical device by running ARCore apps in a virtual environment.\u003c/p\u003e\n"],["\u003cp\u003eSet up your development environment by installing Android Studio 3.1 or later and Android Emulator 27.2.9 or later, then create a virtual device with AR support by configuring it with an x86 or x86_64 system image running API Level 27 or later and setting the Camera Back to VirtualScene.\u003c/p\u003e\n"],["\u003cp\u003eUpdate Google Play Services for AR on the emulator by downloading and installing the latest APK from the GitHub releases page.\u003c/p\u003e\n"],["\u003cp\u003eControl the virtual scene by pressing and holding Shift for camera movements and using the Virtual Sensors tab in Extended controls for precise positioning, while adding Augmented Images using the Camera tab in Extended controls to load images into the simulated environment.\u003c/p\u003e\n"]]],["To test AR apps without a physical device, use the Android Emulator. First, install Android Studio and the required SDK tools (Android Emulator 27.2.9+ and Google APIs Intel x86 Atom System Image API Level 27+). Create a new Android Virtual Device (AVD) with an x86 system image, ensuring \"Camera Back\" is set to \"VirtualScene.\" Update Google Play Services for AR by installing the correct APK. Control the virtual camera using Shift and WASDQE keys. Add scene images via Extended Controls.\n"],null,["# Run AR Apps in Android Emulator\n\nUse the [Android Emulator](https://developer.android.com/studio/run/emulator.html)\nto test AR scenarios without a physical device. The Android Emulator lets you\nrun ARCore apps in a virtual environment with an emulated device that you\ncontrol.\n\nSet up your development environment\n-----------------------------------\n\nSoftware requirements:\n\n- [Android Studio](https://developer.android.com/studio/) **3.1** or later.\n\n- [Android Emulator](https://developer.android.com/studio/run/emulator.html#Requirements)\n **27.2.9** or later.\n\nGet Android Studio and SDK tools for ARCore\n-------------------------------------------\n\n1. Install [Android Studio](https://developer.android.com/studio/) 3.1 or later.\n\n2. In Android Studio, go to **Preferences \\\u003e Appearance and Behavior \\\u003e System Settings \\\u003e Android SDK**.\n\n3. Select the **SDK Platforms** tab and check **Show Package Details**.\n\n Under the appropriate Android version select: \n\n **Google APIs Intel x86 Atom System Image** API Level 27 or later.\n4. Select the **SDK Tools** tab and add **Android Emulator** 27.2.9 or later.\n\n5. Click **OK** to install the selected packages and tools.\n\n6. Click **OK** again to confirm changes.\n\n7. **Accept** the license agreement for the Component Installer.\n\n8. Click **Finish**.\n\nCreate a virtual device with AR support\n---------------------------------------\n\nFor more information, see the Android Studio instructions to [Create a\nVirtual Device](https://developer.android.com/studio/run/managing-avds.html#createavd).\n\n### Create a new Android Virtual Device (AVD)\n\n1. In Android Studio open the *Device Manager* by clicking **Tools \\\u003e Device Manager**.\n\n2. Click **Create Device** , at the top of the *Device Manager* panel.\n\n3. Select or create your desired *Phone* hardware profile and select **Next**.\n\n4. Select an `x86` or `x86_64` system image running **API Level 27 or later**\n and select **Next** . \n\n - While physical ARCore devices are supported on API Level 24 or later,\n Android Emulator support requires API Level 27 or later.\n\n - Only x86-based Android Emulator architectures are supported. Other\n architectures such as `arm64-v8a`, `armeabi-v7`, are not currently\n supported.\n\n5. Verify that your virtual device is configured correctly:\n\n - Click **Show Advanced Settings**.\n\n - Make sure that **Camera Back** is set to **VirtualScene**.\n\n6. Click **Finish** to create your AVD.\n\nRun your app\n------------\n\nTest an ARCore app on an AR-supported virtual device in the emulator. To do\nthis, you can follow the Android Studio instructions to\n[Run an app in the Android Emulator](https://developer.android.com/studio/run/emulator.html#runningapp).\n| **Note:** To run apps with NDK components in the Android Emulator, your app must be built with [**x86 ABIs**](https://developer.android.com/ndk/guides/abis.html). For an example, see the [**ARCore HelloAR C sample app**](https://github.com/google-ar/arcore-android-sdk/tree/master/samples/hello_ar_c).\n\n### Update Google Play Services for AR\n\nThe version of Google Play Services for AR on the emulator is likely out of\ndate. Follow these instructions to update it:\n\n1. Download the latest **Google_Play_Services_for_AR_1.50.0_x86_for_emulator.apk** from the GitHub\n [releases](https://github.com/google-ar/arcore-android-sdk/releases) page.\n\n2. Install the downloaded APK into each AVD you'd like to use:\n\n Start the desired AVD, then drag the downloaded APK from your system folder\n (i.e., **Downloads** ) onto the running\n emulator, or install it using `adb` while the virtual device is running: \n\n ```\n adb install -r Google_Play_Services_for_AR_1.50.0_x86_for_emulator.apk\n ```\n\n \u003cbr /\u003e\n\nRepeat these steps process for any additional AVDs you'd like to use.\n\n### Control the virtual scene\n\nWhen your app connects to ARCore, you'll see an overlay describing how to control\nthe camera and a status bar below the emulator window.\n\n#### Move the virtual camera\n\nPress and hold **Shift** to access camera movement controls.\nUse the following controls to move the camera:\n\n\u003cbr /\u003e\n\n| Action | What to do |\n|---------------------------|---------------------------------------|\n| Move left or right | Hold **Shift** + press **A** or **D** |\n| Move down or up | Hold **Shift** + press **Q** or **E** |\n| Move forward or back | Hold **Shift** + press **W** or **S** |\n| Change device orientation | Hold **Shift** + move mouse |\n\n\u003cbr /\u003e\n\nRelease **Shift** to return to interactive mode in the emulator.\n\nUse the **Virtual Sensors** tab in [Extended controls](https://developer.android.com/studio/run/emulator.html#extended)\nfor more precise device positioning.\n\n### Add Augmented Images to the scene\n\nLoad images into the emulator's simulated environment to test [Augmented Images](/ar/develop/augmented-images).\n\nUse the **Camera** tab in **Extended controls** to add or modify **Scene images**.\nThere are two image locations, one on the wall and one on the table.\n\nTo view these image locations in the scene, launch your emulator, then move the\ncamera to the dining room area through the door behind the camera's starting\nposition.\n\n### Troubleshooting tips\n\n- If your ARCore app launches and you see a \"This device does not support AR\"\n message, check the revision on your system image. Make sure you are using\n **API Level 27 Revision 4 or later**.\n\n- If your ARCore app fails to open the camera when it launches, make sure that\n **Camera Back** is set to **VirtualScene** ,\n as described in the [configuration steps above](#configure_the_virtual_device).\n\n- If your ARCore app fails to open with the error message \"Failed to create AR\n session\" check the app log. If you find a `java.lang.UnsatisfiedLinkError`\n with a message that contains `/lib/arm/libarcore_c.so\" is for EM_ARM (40)\n instead of EM_386 (3)`, you may have installed the wrong version of the\n **Google Play Services for AR** apk. Create a new virtual device and install\n the x86 version."]]