14

I don't know if I'm allowed to ask this question but I really can't figure out how to use ARCore on Android Emulated Device. According to the official guide I'm supposed to use API 8.1 on pixel/pixel 2 device in order to run any app which uses ARCore. Sadly those emulator don't come with the support for Play Store, and without Play Store I can't Instal ARCore on the device.

The device images that come with built in Play Store can't run ARCore instead. I'm really confused about how am I supposed to test anything for ARCore in this way. I need it to develop an app for a University program and I need to become familiar with Augmented Reality Development but I can't even get started because of this issue.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
  • I am pretty sure that the Emulator is not ready for ARCore as it has no hardware camera (and even if you use a Webcam for it, it lacks the necessary IMU measurements needed for the tracking) – PhilLab Apr 13 '18 at 14:18
  • 1
    I use as reference this guide: https://developers.google.com/ar/develop/java/emulator there it's said that if I use those settings I should (at least) be able to run the test app that's provided in ARCore SDK. – Luca Effe Federzoni Apr 13 '18 at 15:28
  • I managed to install the Play Store on the Pixel 2 emulator, but I'm still having the: "Your device isn't compatible with this version error" from the store. – Luca Effe Federzoni Apr 13 '18 at 15:47
  • Oh sorry for the misinformation, I did not see that page of the docs. Wow, the Emulator does support ARCore? How cool is that? What a pity it does not work for you, though. – PhilLab Apr 13 '18 at 15:58

3 Answers3

15

Updated: May 11, 2023.

For using ARCore Emulator, at first, you have to create a virtual device with support for AR. I'm running Android Studio Flamingo on macOS Ventura 13.4.

I created Pixel 6 Pro virtual device:

enter image description here

ARCore's targetSdkVersion has been set to Android API level 33.

enter image description here

Here are the steps you have to make in order to get a working Emulator:

  • Set up Android Debug Bridge. I set up adb for Mac.

  • Download Google_Play_Services_for_AR_1.37.0_x86_for_emulator.apk from GitHub repository.

  • Run your AVD.

  • Type in Bash Terminal the following command (to be sure that the port is 5554):

      adb devices
    
  • Result:

      // emulator-5554    device
    
  • Go to the folder where Google_Play_Services_for_AR_1.37.0_x86_for_emulator.apk is located. For instance:

      cd ~/Desktop
    
  • To install Emulator, type in Terminal the following line, while the virtual device is running:

      adb install -r Google_Play_Services_for_AR_1.37.0_x86_for_emulator.apk  
    
  • Repeat previous steps for additional AVDs you’d like to use.

  • Delight!

enter image description here

P.S.

Take it into consideration: Android Emulator does not support such ARCore APIs as: Depth API, Geospatial API or Augmented Faces API. That's because Emulator doesn't have corresponding sensors. When any of these features are enabled, the Emulator picture can't render correctly: a screen will be entirely black, although UI elements drawn on top of the Emulator picture still be rendered.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
3

Sergei's answer was right at the time, but the version of the ARCore app in his link (v1.1.0) is now too old. The following worked for me (after many false starts):

VIRTUAL DEVICE SPECIFICATIONS

Device: Pixel API 27

System image: Oreo / API Level 27 / ABI x86 / Android 8.1 (Google Play)

LINK TO ARCORE APK: https://www.apkmirror.com/apk/google-inc/arcore/arcore-1-5-18091013-release/arcore-1-5-180910139-android-apk-download/download/

Download the ARCore APK to your desktop. In Android Studio, set up and then start the virtual device as specified above, open the Play Store app on it and sign in. Then drag the ARCORE APK file onto the virtual device; it should silently install. Finally, run hellosceneform on the virtual device.

Sam Healy
  • 31
  • 1
2

Just install to emulator ARCore_1_1_x86_for_emulator.apk. Just drug to emulator. Check this link https://github.com/google-ar/arcore-android-sdk/releases/tag/v1.1.0