Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
852 views
in Technique[技术] by (71.8m points)

bash - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...