Issues getting a new project "working" on Android

Include the following details while filing a bug report (edit as applicable):

  • Issue category: ARDK Documentation / Developer Tools
  • Device type & OS version: Android
  • Host machine & OS version: Mac / Windows
  • Issue Environment : On Device
  • Xcode version: N/A
  • ARDK version: 2.4.1
  • Unity version: 2021

Bug reproduction steps:

I have created a new blank project on Mac for iOS using the default prefabs provided with the ARDK 2.4.1. Following the iOS instructions, this all works fine.

However, when I try to build from Android, following all the instructions (which are in several places which is tremendously annoying, especially adding URP in the mix), this results in a black screen.

Things then get weird by changing the setup of the Scene.

  • Using the ARDK Scene Manager prefab - works on iOS - Black screen on Android (even adding the Android Permissions checker)
  • Adding the Depth Manager to the camera makes it work on Android (not required on iOS)

This is truly baffling, especially when compared to all the example scenes, including the AR Voyage sample, use various different setup patterns and configurations.

Replication

  1. Create a new URP project
  2. Add the ARSDK and configure the license (there really should be a menu option to automatically create this for you)
  3. Remove the default camera.
  4. Find the ARSessionManager prefab (buried in “extensions\prefabs” ??) and add this to the scene
  5. Add the Android Permissions Requester to the Session Manager object - Permissions — Niantic Lightship Augmented Reality Developer Kit release-2.4.1 documentation
  6. Configure all the URP things, Graphics and Quality settings to use the ARDK profile - Using the Universal Render Pipeline — Niantic Lightship Augmented Reality Developer Kit release-2.4.1 documentation
  7. Update all the Android settings from - Building ARDK Apps for Android — Niantic Lightship Augmented Reality Developer Kit release-2.4.1 documentation
  8. Update the Gradle manifest to set the gradle version
  9. Update the Android Manifest to include the ARCore settings

(I tried to add the links to the docs but the forum stopped me)
Build and Run the project and you get a Blank screen? (even though this works on iOS)

Replication 2

Repeat the above but manually add the AR Depth Manager to the camera
Now works on Android too, so the depth manager should be part of the base prefab.

P.S. there really should be better documentation on getting started with 2.4.1, focusing on a single page that lists everything you need to do to setup for each platform without having to fail, search for help, find more docs and then rinse/repeat until something works. It should just work “out of the box”, something like:

  1. Create new project
  2. Add ARDK asset
  3. Hit a button to configure the scene
  4. Have a checker that validates the configuration options for the runtime platform (settings, manifests, etc)
  5. Build and Run.

5 minutes to get a user up and running.

Hello Mr. Jackson,

I spent yesterday reproducing the issues based on the information you provided and at the moment this seems like it may be a bug. Unlike your 3rd repro which seems to have worked, none of them worked for me. I double checked with a colleague to ensure I had the correct URP settings and everything looks right but I am getting the black screen on all reproductions you provided while the SRP works just fine. We will continue investigating this issue on our end, I will get back to you if I have any more information.

1 Like

Hello Mr. Simon Jackson,

I recently had a successful URP build for Android using the same Unity and ARDK versions from when I first reproduced your issue. This time around it worked and I thought I would give your reproductions a second attempt. This time all three of them yielded an AR session with a working camera so it’s likely not a bug but a setup or device problem.

If you’re still running into this issue, I was wondering if you can provide me with details on how you originally got the project set up. Did you use the prebuilt URP project? I created a default Unity project and manually added the URP package.

Another possibility that came to mind was the Android Manifest. With this version of ARDK, Unity now fills in the necessary tags automatically at build time. All you have to do is check the box for “Custom Main Manifest” under the Player’s Publishing section. I’ve noticed that manually editing this file was giving some users a black screen. By any chance did you manually edit it or did you just build and let Unity fill in the tags for you?