这是一则转发帖子,因为我在unity论坛上没有获得任何反响,所以向更广泛的观众提出同样的问题,我已经在这个问题上卡了几天了。
我最近在 play store 上 alpha 版本的应用程序中遇到了麻烦。我最近一直在做一些工作,并只是使用 Unity 中的运行和构建选项来测试我的应用程序是否正常工作,然而,这个问题让我有点困惑。
当我试图从 playstore(Closed Alpha)下载我的应用程序时,该应用程序似乎安装没有任何问题,但当它打开时立即关闭。
我已将手机连接到电脑上,并在 cmd 中运行了 adb logcat 以及来自工具的 monitor,当我尝试打开它时,会产生以下崩溃:
我已编辑了我的指纹和公司名称。
09-21 07:42:05.103: E/CRASH(7870): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000007c2f67f818
09-21 07:42:05.103: E/CRASH(7870): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-21 07:42:05.103: E/CRASH(7870): Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
09-21 07:42:05.103: E/CRASH(7870): Build fingerprint: 'OnePlus/OnePlus3/OnePlus3T:9/***********/**********:user/release-keys'
09-21 07:42:05.103: E/CRASH(7870): Revision: '0'
09-21 07:42:05.104: E/CRASH(7870): pid: 7870, tid: 9955, name: UnityMain >>> com.Company.Game <<<
09-21 07:42:05.104: E/CRASH(7870): x0 00000079ff9c67d8 x1 0000000000000007 x2 0000007a9e1ec560 x3 0000000000cdb330
09-21 07:42:05.104: E/CRASH(7870): x4 00000000001c8b08 x5 0000000000ce3330 x6 00000000001ccb08 x7 e661aa1c417c1492
09-21 07:42:05.104: E/CRASH(7870): x8 00000000464c457f x9 00000079fd05cc20 x10 0000000000539a10 x11 00000000000000e4
09-21 07:42:05.104: E/CRASH(7870): x12 e661aa1c417c1492 x13 00000000000000d5 x14 00000000000000d5 x15 0000007a9e1a8cc0
09-21 07:42:05.104: E/CRASH(7870): x16 0000007a9e1e31e0 x17 0000007a9e0e34b8 x18 0000000000000004 x19 00000079ff7fcdb0
09-21 07:42:05.104: E/CRASH(7870): x20 00000079fb84e6d8 x21 00000079fd283000 x22 00000079fd023530 x23 00000079fd283000
09-21 07:42:05.104: E/CRASH(7870): x24 00000079fd283000 x25 00000079fd283000 x26 00000000000002d4 x27 00000079fb84e6d4
09-21 07:42:05.104: E/CRASH(7870): x28 0000000000000ae5 x29 00000079ff7fce30 x30 00000079fbef29f4
09-21 07:42:05.104: E/CRASH(7870): sp 00000079ff7fcda0 pc 00000079fbef29e0 pstate 0000000000000000
09-21 07:42:05.104: E/CRASH(7870): backtrace:
09-21 07:42:34.377: E/CRASH(9993): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000007c2f76e818
09-21 07:42:34.377: E/CRASH(9993): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-21 07:42:34.377: E/CRASH(9993): Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
09-21 07:42:34.377: E/CRASH(9993): Build fingerprint: 'OnePlus/OnePlus3/OnePlus3T:9/**********/*********:user/release-keys'
09-21 07:42:34.377: E/CRASH(9993): Revision: '0'
09-21 07:42:34.377: E/CRASH(9993): pid: 9993, tid: 10035, name: UnityMain >>> com.Company.Game <<<
09-21 07:42:34.377: E/CRASH(9993): x0 00000079ff9ec7d8 x1 0000000000000007 x2 0000007a9e1ec560 x3 0000000000cda6a0
09-21 07:42:34.377: E/CRASH(9993): x4 00000000001c7748 x5 0000000000ce26a0 x6 00000000001cb748 x7 e661aa1c417c1492
09-21 07:42:34.377: E/CRASH(9993): x8 00000000464c457f x9 00000079fd14bc20 x10 0000000000539a10 x11 00000000000000e4
09-21 07:42:34.377: E/CRASH(9993): x12 e661aa1c417c1492 x13 00000000000000d8 x14 00000000000000d8 x15 0000007a9e1a8cc0
09-21 07:42:34.377: E/CRASH(9993): x16 0000007a9e1e31e0 x17 0000007a9e0e34b8 x18 0000000000000004 x19 00000079ff7fcdb0
09-21 07:42:34.377: E/CRASH(9993): x20 00000079fb93d6d8 x21 00000079fd372000 x22 00000079fd112530 x23 00000079fd372000
09-21 07:42:34.377: E/CRASH(9993): x24 00000079fd372000 x25 00000079fd372000 x26 00000000000002d4 x27 00000079fb93d6d4
09-21 07:42:34.377: E/CRASH(9993): x28 0000000000000ae5 x29 00000079ff7fce30 x30 00000079fbfe19f4
09-21 07:42:34.377: E/CRASH(9993): sp 00000079ff7fcda0 pc 00000079fbfe19e0 pstate 0000000000000000
09-21 07:42:34.377: E/CRASH(9993): backtrace:
09-21 07:42:34.403: E/CRASH(9993): #00 pc 000000000000068c [vdso] ()
09-21 07:42:34.403: E/CRASH(9993): #01 pc 00000000006a19dc /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.403: E/CRASH(9993): #02 pc 00000000006a157c /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.403: E/CRASH(9993): #03 pc 00000000006a9680 /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.404: E/CRASH(9993): #04 pc 0000000000676d8c /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.404: E/CRASH(9993): #05 pc 00000000003386bc /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.404: E/CRASH(9993): #06 pc 00000000002da0a0 /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.404: E/CRASH(9993): #07 pc 00000000002da9b4 /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.404: E/CRASH(9993): #08 pc 00000000002d3b1c /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/split_config.arm64_v8a.apk ()
09-21 07:42:34.404: E/CRASH(9993): #09 pc 0000000000000d7c /data/app/com.Company.Game-lZRPnhDcySTa8I_G8bddEg==/oat/arm64/base.odex ()
带有Unity标签的信息日志:
09-21 08:11:40.322: I/Unity(15669): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 4, Memory = 5738mb
09-21 08:11:40.322: I/Unity(15669): SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc), 2 little (mask: 0x3)
09-21 08:11:40.322: I/Unity(15669): ApplicationInfo com.Company.Game version 0.11 build b6058604-4beb-45ab-81d6-13bed6aa8d13
09-21 08:11:40.322: I/Unity(15669): Built from '2019.2/staging' branch, Version '2019.2.0f1 (20c1667945cf)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
我已经阅读了相关内容,其中一个推荐的解决方法在此线程中: https://issuetracker.unity3d.com/issues/android-crash-fatal-signal-11-sigsegv-on-some-devices 该线程建议您关闭剥离并在C ++编译器配置中启用调试模式。
重新构建并放置于应用商店后,我遇到了新的错误。
09-21 08:11:40.469: E/CRASH(15669): signal 6 (SIGABRT), code -6 (?), fault addr --------
09-21 08:11:40.469: E/CRASH(15669): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-21 08:11:40.469: E/CRASH(15669): Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
09-21 08:11:40.469: E/CRASH(15669): Build fingerprint: 'OnePlus/OnePlus3/OnePlus3T:9/*********/**********:user/release-keys'
09-21 08:11:40.469: E/CRASH(15669): Revision: '0'
09-21 08:11:40.469: E/CRASH(15669): pid: 15669, tid: 15688, name: UnityMain >>> com.Company.Game <<<
09-21 08:11:40.469: E/CRASH(15669): x0 0000000000000000 x1 0000000000003d48 x2 0000000000000006 x3 0000000000000008
09-21 08:11:40.469: E/CRASH(15669): x4 0000000000000080 x5 0000000000000080 x6 0000000000000080 x7 0000000000000040
09-21 08:11:40.469: E/CRASH(15669): x8 0000000000000083 x9 e661aa1c417c1492 x10 fffffff87ffffbdf x11 e661aa1c417c1492
09-21 08:11:40.469: E/CRASH(15669): x12 e661aa1c417c1492 x13 fffffff87ffffbdf x14 000000005d854e9c x15 0000000000000008
09-21 08:11:40.469: E/CRASH(15669): x16 0000007a9e1e32b0 x17 0000007a9e0f5088 x18 e661aa1c417c1492 x19 0000000000003d35
09-21 08:11:40.469: E/CRASH(15669): x20 0000000000003d48 x21 0000000000000083 x22 00000079ff3fd978 x23 00000079ff3ff588
09-21 08:11:40.469: E/CRASH(15669): x24 00000079ff3ff588 x25 00000079ff3fd970 x26 0000007a0078d001 x27 0000007a007240b8
09-21 08:11:40.469: E/CRASH(15669): x28 00000079ff3fd420 x29 00000079ff3fcbc0 x30 0000007a9e0e64d0
09-21 08:11:40.469: E/CRASH(15669): sp 00000079ff3fcb80 pc 0000007a9e0e64f0 pstate 0000000060000000
09-21 08:11:40.469: E/CRASH(15669): backtrace:
09-21 08:11:40.495: E/CRASH(15669): #00 pc 000000000000068c [vdso] ()
09-21 08:11:40.495: E/CRASH(15669): #01 pc 00000000000224ec /system/lib64/libc.so (abort+108)
09-21 08:11:40.495: E/CRASH(15669): #02 pc 0000000000022874 /system/lib64/libc.so (__assert2+52)
09-21 08:11:40.495: E/CRASH(15669): #03 pc 0000000000b073d8 /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #04 pc 0000000000b150ac /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #05 pc 0000000000b14a08 /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #06 pc 0000000000b26474 /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #07 pc 0000000000aad424 /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #08 pc 0000000000654c94 /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #09 pc 00000000006b5b6c /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #10 pc 00000000006b64bc /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #11 pc 00000000006c40d4 /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/split_config.arm64_v8a.apk ()
09-21 08:11:40.495: E/CRASH(15669): #12 pc 0000000000000d7c /data/app/com.Company.Game-MboFrn89773Nfmb54RA7zA==/oat/arm64/base.odex ()
再谈Unity标签:
09-21 08:19:09.582: I/Unity(16067): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 4, Memory = 5738mb
09-21 08:19:09.582: I/Unity(16067): SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc), 2 little (mask: 0x3)
09-21 08:19:09.583: I/Unity(16067): ApplicationInfo com.Company.Game version 0.12 build 8c1bcf0b-b913-4f07-be91-f94b598dbf47
09-21 08:19:09.583: I/Unity(16067): Built from '2019.2/staging' branch, Version '2019.2.0f1 (20c1667945cf)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Disabled'
一些信息:
使用 OnePlus 3T
- 使用 Unity 2019.2.0f1(但已使用了一段时间,没有最近的升级)
- 它在 ARM64 上运行
- 为了上传到应用商店,我在构建包中禁用了 x86。
- 在不同的 Windows 手机上会导致相同的问题(不确定朋友的手机版本是什么,但不是 OnePlus)
- 从应用商店打开时每次都会崩溃
- 如果我将文件构建为 .apk,我可以无错误地构建、移动到我的手机上、安装并加载
- 使用 APK 构建和运行结果相同
- 使用 AAB 构建和运行结果相同
- 构建并放置在应用商店上,然后从那里下载并安装会产生错误。
- 我在电脑上下载了 Bluestacks,它可以正常工作。
- 我在网上找到的大多数问题都表明 Firebase SDK 过时,我没有使用 Firebase,我使用 Gamesparks 作为后端。
据我所知,没有什么特别的更改导致了这个错误。我想解决最初的错误,以便不必更改我的编译器和剥离选项,因为它会将文件大小增加到 44+MB,而不是应用商店上的 20MB。
我已经研究了几天了,任何帮助都将不胜感激 :)