Black Screen in AR Foundation when exported and launched with Android Studio

HI, I have a big project that uses AR Foundation that is exported to a native Android Studio parent app and run from there. I have been updating it from Unity 2019 to Unity 2022.3.11f1. I have it all working when I build it directly to an APK from Unity but when I export it I get a black screen when launched from Android Studio. I have the other non AR parts working from Android Studio but can not get AR Core on Android to render the room around me. I have the camera permissions working and have everything as it was before but just not getting anything. It worked fine with Unity 2019 but nothing now.

Any ideas? Thanks

What version of AR Foundation are you running? There’s an issue that could cause this in AR Foundation 5.0 that was fixed in AR Foundation 5.1.0. First thing I would suggest is that you upgrade to 5.1.0 and see what happens?

Hi Andy, thanks for your response. I followed the example of Unity as a library here and made sure my code looked the same, especially the build.gradle files and its working now. Thanks!