الزامات اضافی برای اجرای برنامه های Sceneform در شبیه ساز وجود دارد:
شما به شبیه ساز اندروید نسخه 27.2.9 یا بالاتر نیاز دارید.
OpenGL ES 3.0 یا بالاتر باید در شبیه ساز Android پشتیبانی و فعال شود.
اطمینان حاصل کنید که شبیه ساز شما برای استفاده از آخرین نسخه پیکربندی شده است. در پنل کنترل های توسعه یافته ( در نوار ابزار، تنظیمات > پیشرفته > سطح API OpenGL ES > حداکثر رندر (تا OpenGL ES 3.1) را انتخاب کنید و سپس شبیه ساز را مجددا راه اندازی کنید.
شبیه ساز را اجرا کنید، به طور خلاصه با دستگاه شبیه سازی شده تعامل کنید، سپس بررسی کنید که آیا OpenGL ES 3.0 یا بالاتر استفاده می شود یا خیر:
adb logcat | grep eglMakeCurrent
اگر ver 3 0 یا بالاتر را می بینید، می توانید برنامه های Sceneform را اجرا کنید. اگر نسخه پایینتری را مشاهده میکنید، پس GPU دسکتاپ شما از OpenGL ES 3.0 پشتیبانی نمیکند و باید از یک دستگاه پشتیبانیشده برای اجرای برنامههای Sceneform استفاده کنید.
نمونه را اجرا کنید
مطمئن شوید که دستگاه اندرویدی شما به دستگاه توسعه متصل است و روی Run کلیک کنید در اندروید استودیو سپس، دستگاه خود را به عنوان هدف استقرار انتخاب کنید و روی OK کلیک کنید.
Android Studio پروژه شما را در یک APK قابل اشکالزدایی میسازد، APK را نصب میکند و سپس برنامه را روی دستگاه شما اجرا میکند. برای اطلاعات بیشتر، به ساخت و اجرای برنامه خود مراجعه کنید.
ممکن است از شما خواسته شود که اگر سرویسهای Google Play برای واقعیت افزوده وجود ندارد یا قدیمی است، آن را نصب یا بهروزرسانی کنید. برای نصب آن از فروشگاه Google Play، CONTINUE را انتخاب کنید.
برنامه Hello Sceneform به شما امکان می دهد مجسمه های اندروید را روی سطوح صاف قرار دهید و آنها را دستکاری کنید.
تاریخ آخرین بهروزرسانی 2022-09-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2022-09-26 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eInstall Android Studio 3.1+ and Android SDK Platform 7.0+ to set up your development environment, along with basic Android development knowledge.\u003c/p\u003e\n"],["\u003cp\u003eDownload or clone the Sceneform Samples project and open the Hello Sceneform sample in Android Studio.\u003c/p\u003e\n"],["\u003cp\u003ePrepare a supported device or emulator with Google Play Services for AR and ensure it meets the specified requirements for running Sceneform apps.\u003c/p\u003e\n"],["\u003cp\u003eBuild and run the sample app on your device or emulator, potentially installing or updating Google Play Services for AR if needed.\u003c/p\u003e\n"],["\u003cp\u003eTo integrate Sceneform into existing projects, enable ARCore, add the Sceneform library to your app's \u003ccode\u003ebuild.gradle\u003c/code\u003e file, and configure compile options if necessary.\u003c/p\u003e\n"]]],["To get started, install Android Studio (version 3.1+) with Android SDK Platform 7.0+. Download or clone the Sceneform Samples, then open the \"Hello Sceneform\" project in Android Studio. Ensure your device or emulator supports OpenGL ES 3.0 or higher. Run the sample by connecting your device and pressing \"Run.\" To use Sceneform in an existing project, enable ARCore and add the Sceneform library to your app's `build.gradle` file.\n"],null,["# Sceneform Quickstart for Android\n\nSet up your development environment\n-----------------------------------\n\n- Install [Android Studio](https://developer.android.com/studio/index.html)\n version 3.1 or higher with Android SDK Platform version 7.0 (API level 24)\n or higher.\n\n- You will need a basic understanding of Android development. If you are new\n to Android, see\n [Building your first Android app for beginners](//developer.android.com/training/basics/firstapp/index.html).\n\nOpen the sample project\n-----------------------\n\nGet the sample projects. You can either:\n\n- Download and extract the [Sceneform Samples](//github.com/google-ar/sceneform-android-sdk/releases)\n\n -or-\n- Clone the repository with the following command:\n\n \u003cbr /\u003e\n\n ```\n git clone https://github.com/google-ar/sceneform-android-sdk.git\n ```\n\n \u003cbr /\u003e\n\nIn Android Studio, open the **Hello Sceneform** sample project, located in the **app** subdirectory within the `sceneform-android-sdk` directory.\n\nPrepare your device or emulator\n-------------------------------\n\nYou can run AR apps on a [supported device](/ar/discover/supported-devices) or\nin the Android Emulator:\n\n- In the emulator, you must sign into the Google Play Store or [update Google Play Services for AR](/sceneform/develop/emulator#update-arcore) manually.\n\nThere are additional requirements to run\nSceneform apps in the emulator:\n\n- You need **Android Emulator** version **27.2.9** or later.\n- **OpenGL ES 3.0** or higher must be supported and enabled in the Android\n Emulator.\n\n - Make sure your emulator is configured to use the latest version. In the\n Extended controls panel\n (\n on the Toolbar), select **Settings \\\u003e Advanced \\\u003e OpenGL ES API level \\\u003e\n Renderer maximum (up to OpenGL ES 3.1)**, and then restart the emulator.\n\n - Run the emulator, briefly interact with the emulated deivce, then check\n whether OpenGL ES 3.0 or higher is being used:\n\n adb logcat | grep eglMakeCurrent\n\n If you see `ver 3 0` or higher version, then you can run Sceneform apps.\n If you see a lower version, then your desktop GPU does not support\n OpenGL ES 3.0 and you must use a\n [supported device](/ar/discover/supported-devices) to run Sceneform\n apps.\n\nRun the sample\n--------------\n\nMake sure your Android device is connected to the development machine and click\n**Run** in Android Studio. Then, choose your device\nas the deployment target and click **OK**.\n\nAndroid Studio builds your project into a debuggable APK, installs the APK, and\nthen runs the app on your device. For more information, see [Build and Run Your App](//developer.android.com/studio/run/index.html).\n\nYou may be prompted to install or update [Google Play Services for AR](//play.google.com/store/apps/details?id=com.google.ar.core)\nif it is missing or out of date. Select **CONTINUE** to install it from\nGoogle Play Store.\n\nThe **Hello Sceneform** app lets you place and manipulate Android figurines on\nflat surfaces.\nYour browser does not support the video tag.\n\nAdd Sceneform to an existing project\n------------------------------------\n\nTo use Sceneform in an existing project:\n\n1. Follow the steps to [Enable ARCore](/ar/develop/java/enable-arcore) in your app\n\n2. Add the Sceneform library to your **app's** `build.gradle` file:\n\n android {\n // Sceneform libraries use language constructs from Java 8.\n // Add these compile options if targeting minSdkVersion \u003c 26.\n compileOptions {\n sourceCompatibility 1.8\n targetCompatibility 1.8\n }\n }\n\n dependencies {\n ...\n\n // Provides ArFragment, and other UX resources.\n implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.15.0'\n\n // Alternatively, use ArSceneView without the UX dependency.\n implementation 'com.google.ar.sceneform:core:1.15.0'\n }\n\nNext steps\n----------\n\n- Try building and running [other sample projects](/sceneform/develop/samples) in the ARCore SDK and Sceneform samples.\n- Learn how to [Enable ARCore](/ar/develop/java/enable-arcore) in your app.\n- Review [Runtime Considerations](/ar/develop/developer-guides/runtime-considerations).\n- Review [Design Guidelines](/ar/develop/developer-guides/design-guidelines)."]]