When I got the build from the project, the game worked fine on all Androids. But the game crashes on Android 13! And it says that the program has stopped.
First, I said that the problem might be with the SDKs. I downloaded all the new SDKs, but the problem was not solved.
Then I said that maybe the project had a problem, and I created a new project and got the same build, but the problem was still not solved.
Then I said that maybe the problem was due to the Unity version, so I downloaded the latest version of Unity and made a build with it, but the game crashed again.
Then I said that maybe Unity couldn’t build correctly, so I exported the project and built it in Android Studio. First, the apk size increased, but the game crashed again!
The project builds without errors, only when I enter the player settings and other settings; in the part that wants to load the maximum API and target, it says “getting API level…” When the API is loaded, several warnings are given in Unity! I think this could be the problem, but I haven’t found any way to fix these warnings. I am posting here the screenshot of these warnings and the downloaded SDKs.
I would be grateful if someone could help me to solve this problem.
I am using Unity 2021.3.8.
I would contact Unity support about this (and I don’t mean just PM Jeff)
Whenever a new Unity Editor is released, it supports Google Play’s target API level requirement at that time.
But each Unity editor supports a different Android toolchain.
For example, you can create a new Android Project from Android Studio and build Android 13 with Android SDK Build Tools 33.0.0 with SDK Commandline Tools 9.0. But also, you can build the same API level with Android SDK Build Tools 30.0.2 with SDK command-line tools 2.1.
However, building Android 13 with Build Tools 33.0.0 or Command-line Tools 9.0(which is not working with JDK 8) from Unity 2021 project may be failed. Unity 2021.3 support Build Tools 30.0.2 and Command-line Tools 2.1.
I can see that you tried to build Android 13 with the latest Android SDK build tools, which is not supported by Unity 2021.3.
I would recommend using internal Android SDK you can install from Unity Hub or remove all Android SDK Build Tools except 30.0.2.
Also, because it seems like runtime crash, collecting android logs using logcat would help finding real problems.