Search code examples
c#androidunity-game-enginegoogle-chromebuild

Unity Android app crashes when installed from Google Play Store


I have made an Unity app for Android and uploaded it to the Google Play Store. Everything worked fine, I have made and uploaded several updates without any problem.

Recently I found out that the app crashes even before the splash screen is shown, but only when downloaded from the Google Play Store.

It works fine when I manually install the apk with "build and run" but when I try to install on the play store it crashes.

It only happens on devices with android 14, I tested it on multiple devices and all the devices with Android 14 have the same problem.

I currently have this problem with 2 of my apps, 1 app is more than 1 year on the app store and recently got this problem, with the other app I uploaded recently the problem came instantly.

I have tried to solve this by modifying the Android manifest file, but with no success by following this solution: Link

I am using Unity 2020.3.38f1, with build settings: Scripting backend: IL2CPP Target architectures: ARMv7, ARM64 Target API level: API level 34 Final apk/aab is more than 150mb (Don't know if this could be a problem)

Any help is appreciated and thanks in advance.


Solution

  • The following solution worked for me:

    I upgraded Unity to a newer version (2022.3.29f1).

    In google play console I got the following message:

    androidx.fragment:fragment (androidx.fragment:fragment) reported that version 1.0.0 is out of date. We recommend that you upgrade to a newer version (1.1.0+). These versions have not been reviewed by Google Play. They may contain vulnerabilities or policy violations. Carefully evaluate third-party SDKs before integrating them into your app. Learn more about the SDKs you use and how to make informed SDK decisions using the Google Play SDK Index. Go to the SDK Index

    I also got this message in Unity, grayed out so not a yellow warning or red error.

    I released the .aab file with these warnings, and now the app works like it should.

    I guess the warning didn't really matter.