Blackscreen when starting an android AR application

Hello all,
I have the following initial situation:

  • Android AR application with AR core
  • unity 2022.3.7f1
  • AR foundation 5.0.7
  • URP 14.0.6
  • Test device: Lenovo Tab P11 (2nd Gen)

The problem with my AR application is that my builds render a blackscreen on startup. It doesn’t even show the unity logo beforehand and no logs are created. When I exit and re-enter the application, I get to my start scene without any problems. I have tried all graphics-, player-, quality- and buildsettings, but I just can’t get any further.

I just tried to launch the apk file via bluestacks, and after a short blackscreen time I get the error: “Unable to initialize the Unity Engine Gfx API.”

does anyone know what this could be? i have even created a sample scene with only the most necessary settings, but it has the same problem.

thanks in advance!

Did you follow all the ar foundation/arcore setup steps?

  1. Make sure OpenGLES3 is used as graphics api
  2. Make sure the android urp asset has the AR render feature

Yeah, I already tried that. The curious thing is that everything has worked before; I was already able to develop a decent, working application. At some point I had to update the Unity version and only since then the error occurred.

Yesterday I was able to (temporarily) fix the error by following the steps from another forum post: Issue with Android: Skipped rendering frame because GfxDevice is in invalid state (device lost)

  1. remove all AR packages
  2. close Unity, delete Library,
  3. install only Google ARCore XR plugin via Package Manager
  4. build for Android

We are aware of an issue where if you have the “AR” Feature Set checked in Package Manager, it can cause blackscreen issues on Android. The workaround posted by @llapalomenta is correct. We’re currently working on this issue.

So it’s a general problem? I have the same issue, there’s a way to make it work or we just have to wait until it’s fixed?

@ArmoryFour follow the steps posted above: https://forum.unity.com/threads/iss…valid-state-device-lost.1449145/#post-9106828

Any update on this? Still happening with new install of AR. I don’t want to use just ARCore.

@NAU_FLION You don’t have to use just ARCore. You can install any combination of packages, just not the Magic Leap package. This issue has been assigned to the Magic Leap team and is in progress.

That’s helpful. Thanks. The referenced instructions only mentioned ARCore, so it wasn’t clear that other APIs were Ok.