Errors: "Unable to find UnityARCore" and "DllNotFoundException"

Viewed 698

I've built an ARCore app in Unity using the ARFoundation Package. Then I embedded Unity app inside a native Android app by following the instructions in this link: Embedded Unity within Android App.

The AR app works fine as a Stand Alone app. But I'm getting the error while embedding it inside a native Android app:

E/Unity: Unable to find UnityARCore
E/Unity: DllNotFoundException: UnityARCore
at (wrapper managed-to-native) UnityEngine.XR.ARCore.Api:UnityARCore_setCameraPermissionProvider (UnityEngine.XR.ARCore.Api/CameraPermissionRequestProvider)
at UnityEngine.XR.ARCore.ARCoreCameraExtension.Register () [0x00000] in <filename unknown>:0
1 Answers

When .aar file of library is generated, It does not include dependent jars/aars somehow. Instead of including .aar we should add unity gradle library as module in our app. This solved issue for me.

Here is more details of how to include unity as a module in your app.

Related