我有一个拥有150k+用户的应用程序,之前一直避免使用appbundle,因为我不知道它的工作原理。但上周我别无选择,只能发送了一个包含appbundle的更新。此后,许多用户报告该应用在启动时会冻结并显示黑屏(没有闪屏)。
我查看了Play控制台中的Android Vitals,发现了以下信息:
signal 11 (SIGSEGV),code 1 (SEGV_MAPERR)
backtrace:
#00 pc 000000000014d960 /data/app/my.app-aw5yMuTEkO-Q1NwkE1kbgg==/lib/arm/libflutter.so
#01 pc 0000000000140bcb /data/app/my.app-aw5yMuTEkO-Q1NwkE1kbgg==/lib/arm/libflutter.so
#02 pc 000000000014389d /data/app/my.app-aw5yMuTEkO-Q1NwkE1kbgg==/lib/arm/libflutter.so
#03 pc 0000000000010255 /system/lib/libutils.so (android::Looper::pollInner(int)+576)
#04 pc 000000000000ff7d /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+32)
#05 pc 000000000000c543 /system/lib/libandroid.so (ALooper_pollOnce+50)
#06 pc 0000000000143979 /data/app/my.app-aw5yMuTEkO-Q1NwkE1kbgg==/lib/arm/libflutter.so
#07 pc 0000000000140a5b /data/app/my.app-aw5yMuTEkO-Q1NwkE1kbgg==/lib/arm/libflutter.so
#08 pc 00000000001429cd /data/app/my.app-aw5yMuTEkO-Q1NwkE1kbgg==/lib/arm/libflutter.so
#09 pc 0000000000048811 /system/lib/libc.so (__pthread_start(void*)+24)
#10 pc 000000000001b369 /system/lib/libc.so (__start_thread+32)
backtrace:
#00 pc 0000000000714094 /data/app/my.app-1/lib/arm64/libflutter.so
#01 pc 000000000028c314 /data/app/my.app-1/lib/arm64/libflutter.so
#02 pc 000000000027d698 /data/app/my.app-1/lib/arm64/libflutter.so
#03 pc 000000000028105c /data/app/my.app-1/lib/arm64/libflutter.so
#04 pc 000000000001c004 /system/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+524)
#05 pc 000000000001c268 /system/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+80)
#06 pc 000000000000c650 /system/lib64/libandroid.so (ALooper_pollOnce+84)
#07 pc 0000000000281178 /data/app/my.app-1/lib/arm64/libflutter.so
#08 pc 000000000027d4ac /data/app/my.app-1/lib/arm64/libflutter.so
#09 pc 000000000027fd5c /data/app/my.app-1/lib/arm64/libflutter.so
#10 pc 0000000000067784 /system/lib64/libc.so (_ZL15__pthread_startPv+52)
#11 pc 000000000001c604 /system/lib64/libc.so (__start_thread+16)
我在许多真实设备和模拟器上测试了它(x86_x64)。不幸的是(或者幸运的是),在所有这些测试中都表现良好。
老实说,我不知道该怎么办。如果有人对发生的事情有提示或者如何重现它的方法,我将非常感激。
Flutter doctor
[√] Flutter (Channel beta, v1.9.1+hotfix.4, on Microsoft Windows [versão 10.0.18362.356], locale pt-BR)
• Flutter version 1.9.1+hotfix.4 at C:\Users\Willian\Documents\Repositories\flutter
• Framework revision cc949a8e8b (7 days ago), 2019-09-27 15:04:59 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\Willian\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[!] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.38.1)
• VS Code at C:\Users\Willian\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.5.1
[!] Connected device
! No devices available
编辑:
问题并不在于应用包。我尝试了使用--split-per-abi创建了两个apk文件("armeabi-v7a"和"arm64-v8a"),但问题仍然存在。