Unable to initialize Unity Engine

I am getting the error “Unable to initialize Unity Engine” after installing the application on my device Pixel 6A (Android 13) either via Build and Run or building the apk and installing it separately. I am using Unity Version “2022.2.13f1”. Also, I am beginner in Unity so, if I need to post any log file(s) kindly tell me the path to find the file(s). And, fyi I have installed the unity using the unityhub 3.4.1 and added android modules at the time of installation. Thanks.

1 Like

Check the logs pls - Android Logcat | Android Logcat | 1.3.2

But this message usually means the necessary shared library - for ex., libunity.so is not present in apk

Sorry for the late reply. As you have suggested the following error came up in the logcat:
Invalid serialized file version. File: “/data/app/~~bzC1-sPuhiRReG2BX5EW8g==/com.DefaultCompany.BallLauncher-5RZ6lthFBv-kznlTGrKwvA==/base.apk/assets/bin/Data/globalgamemanagers”. Expected version: 2022.2.12f1. Actual version: 2022.2.13f1
As 2022.2.12f1 came up in the error let me add few more details. At first when I tried to install unity(2021.3.22f1 LTS) from the unity hub there was some issue and the installation was taking like forever so I cancelled that and installed 2022.2.12f1 manually and started working on a tutorial project but when I tried to install the android module the option was not there in unity hub so I installed 2022.2.13f1 with the android module. After that I upgraded my project’s unity version from 2022.2.12f1 to 2022.2.13f1 and the build the project for android and the build was successful and apk was generated but after installation this error shows up.
Can you please tell me if there is any way to solve the issue without reinstalling unityhub and unity.

Well as the error states, you cannot mix modules and Unity Editor from different versions. Basically you need to match versions, either by installing via HUB or ensuring manually that Android module and Unity Editor belong to the same version

It’s not very clear to me the solution you are suggesting.
In Unity’s Edit->Preferences->External Tools section
JDK location is set to:
C:\Program Files\Unity\Hub\Editor\2022.2.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
SDK location is set to:
C:\Program Files\Unity\Hub\Editor\2022.2.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
NDK location is set to:
C:\Program Files\Unity\Hub\Editor\2022.2.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
Gradle location set to:
C:\Program Files\Unity\Hub\Editor\2022.2.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle
So, can you please elaborate on the solution/debugging process you are suggesting me to apply?

EDIT:
I have already uninstalled 2022.2.12f1 from hub and ensured that also from file explorer. So, my guess is that there might be some configuration file which is telling unity to build the project using 2022.2.12f1 or something like that and I might need to change that information only. Again, that is my guess only.

Got tired and reinstalled the whole thing UnityHub and Unity both. Now it’s working. Thanks for your support.

1 Like

what version are you using right now?

I’m getting the same thing, my phone is saying that right after I downloaded a game app; Colorwood Sort Puzzle Game

it could be related to your graphics card