Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Install ARCore on emulator for Android Studio

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.

like image 687
Luca Effe Federzoni Avatar asked Apr 13 '18 13:04

Luca Effe Federzoni


People also ask

How do I fix ARCore not compatible?

Reinstall the App Reinstalling the apps that are not working can stop the crashing problem completely. Reinstalling Google Play Services for AR will also help you to download the latest version of the game. First, uninstall the app from your Android smartphone and then go to the Play Store to install the app.

How do I install ARCore on an unsupported device?

Case 3: Root Method for Unsupported Devices Once the device is rooted, open Magisk Manager and tap on the drop down menu located at the top of the screen. Select Downloads and type ARCore in the text field. Select ARCore/Playground Patcher, install it and then reboot your device.


2 Answers

Updated: September 15, 2020.

For using this emulator, at first, you have to create a virtual device with support of AR. I'm running Android Studio 4.0 on macOS Catalina 10.15.6.

You can follow the Android Studio instructions to Create a Virtual Device with AR support.

I created two virtual devices: the first is for Google Pixel and the second is for Huawei.

enter image description here

Go to ToolsAVD Manager main menu and create you AVD. My window looks like this:

enter image description here

Make sure that Camera Back is set to VirtualScene.

Here are some steps you have to do in order to get a working emulator:

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

  • Download ARCore_1.15_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 ARCore_1.15_x86_for_emulator.apk is located. For instance:

      cd ~/Desktop
    
  • Type in Terminal for installing ARCore for AVD while the virtual device is running:

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

  • Delight!

enter image description here

But remember: Android Emulator does not support ARCore APIs for Depth, Augmented Faces, or Augmented Images. When any of these features are enabled, the camera preview image does not render correctly: the GPU camera texture is entirely black, although UI elements drawn on top of the preview image still render correctly.

like image 81
Andy Jazz Avatar answered Oct 21 '22 00:10

Andy Jazz


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.

like image 27
Sam Healy Avatar answered Oct 21 '22 01:10

Sam Healy