App Crash on Android 11 Devices
Please help, my unity game crash when I build on Android 11 (API 30) devices. Android version below 10 is working fine.
I am using Unity 2020.1.1f1.
Minimum API Level (API 19), target API Level (API 30).
These are some of the packages I just updated recently which I think it might be the issue, but I am not sure about it.
Firebase App (Core), Firebase Crashlytics, Firebase Authentication, Cloud Firestore For Firebase (All Ver 6.15.2)
External Dependancy Manager for Unity Ver 1.2.1
Advertisement (Unity Ads) Ver 3.4.9
In App Purchasing Ver 2.1.1
The tombstone file is attached below, here are part of it.
Version '2020.1.1f1 (2285c3239188)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a' Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:11/RSR1.200819.001.A1/6823625:userdebug/dev-keys' Revision: '0' ABI: 'arm' Timestamp: 2020-09-25 01:35:50+1000 pid: 16859, tid: 16902, name: UnityMain >>> com.aubjective.jobmania <<< uid: 10157 signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xebaa11a0 r0 00000001 r1 ebf84a00 r2 00003435 r3 aee40f10 r4 ebaa11a0 r5 00000001 r6 aefc6628 r7 00000000 r8 00000002 r9 aefc40c0 r10 00000001 r11 ba5aaac3 ip ba781e84 sp b716fc40 lr b9bfc07c pc ebaa11a0
backtrace: #00 pc 0001c1a0 /system/lib/libEGL.so
Thanks in advance
I have the exact same issue with unity 2019 LTS, and with 2020.1.8f1
Answer by MochiBits · Sep 25, 2020 at 08:52 PM
Try disabling Unity Ads. I found Unity Ads caused our crashing. Do not know how to fix it yet though.
I appreciate your reply, it used to be the issue, but it's not that for my case. If you update Unity Ads to the latest version, it solved the problem. I just found out there are more Android 11 API 30 sdk variation I can download on android studio, I will try to build my app with them and see how it goes.
Nope, after a few days, I tried so many things nothing works. I don't even know where the error came from. Please help, anyone T^T
Answer by erikhallgren · Oct 06, 2020 at 07:02 PM
THIS WORKED FOR A WHILE, BUT NOT ANYMORE. I HAVE NO IDEA WHY In the end i isolated ProjectSettings as the culprit and did the following:
back up your project first
Backed up ProjectSettings/ProjectSettings.asset for easy reference in another project so I could double check what settings I had
Replaced ProjectSettings/ProjectSettings.asset with a fresh version from a clean new project that I had confirmed could build a functioning .apk
Repopulated the now missing fields (e.g. icons, intro, project name and version)
Disabled Optimized Frame Pacing (causes crashing on Pixels with Android 11, confirmed with fresh project)
Set Splash Image - Animation to static (apparently caused crash for me, weird)
Built out the project and confirmed working
speculation I had updated the project through 2017, 2018 LTS, 2019 LTS versions over time which might have caused this
Hey, thank you for your help. I tried another project and build it on android 11, it doesn't work as well. At least now I know maybe it's not the code issue, it's unity 2020.1.1f1 issue? So weird, I wonder why no one else reported about this.
I can replicate the crash as well in a project with optimized frame pacing, if i disable that then it builds fine. It does however work as expected when updating to latest 2020 version if that is an option for you
Aaaaand it's back, using 2020.1.8f1... I honestly have no idea...
I am using Unity 20.20.2.1f1 and my android build APK is crashing in Android 11. I am unable to track it from adblogcat because crash is totally random