Unable to initialize the Unity Engine in my Android Studio project

530 Views Asked by At

I'm using android on demand module where I want to add whole unity project as an on demand module so that app size won't be increased. I'm following this tutorial for implementing on demand module. https://developer.android.com/codelabs/on-demand-dynamic-delivery#0

I'm able to download the unity module but not able to open it. I'm getting a message that says "Unable to intialize the Unity Engine".

Screenshot

I'm getting the following error in the logcat when I try to open unity module:

jox.a(75): Request execution failed with error code: -2
com.google.android.finsky.assetmoduleserviceutils.AssetModuleException: Request to PGS failed because all packs are unavailable.

at ini.acw(PG:53)
at iqz.l(PG:7)
at hvr.run(PG:5)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:223)
at android.os.Looper.loop(Looper.java:324)
at android.app.ActivityThread.main(ActivityThread.java:8464)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1059)

The On-Demand Module size is approx 28 MB. I'm using Unity version 2021.3.16f1 and have added VisionLib SDK in my Unity Project.

I have followed all the steps mentioned in the on-demand module creation documentation. But still getting this error.

0

There are 0 best solutions below