java 请解释Google Play发布前崩溃和ANR报告详情

vq8itlhq  于 2023-01-04  发布在  Java
关注(0)|答案(2)|浏览(193)

我使用VSCode编写Flutter应用程序,并将其部署到Google Play商店,但发布前报告显示它在特殊设备上崩溃:Google Pixel 2(virtual),1080 x1920,Android 9(SDK 28),armeabi,en_US我配置了那个设备并测试了它,它没有崩溃。我不明白报告。我需要帮助将报告与Dart/Flutter代码联系起来。这是报告。请帮助!!

FATAL EXCEPTION: main
Process: com.outafire.myevents, PID: 6669
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.outafire.myevents/com.outafire.myevents.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/lib/x86, /data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/lib/x86, /data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
    at x6.f.g(Unknown Source:457)
    at io.flutter.embedding.engine.a.<init>(Unknown Source:184)
    at io.flutter.embedding.engine.a.<init>(Unknown Source:12)
    at io.flutter.embedding.android.e.G(Unknown Source:106)
    at io.flutter.embedding.android.e.p(Unknown Source:7)
    at io.flutter.embedding.android.d.onCreate(Unknown Source:13)
    at android.app.Activity.performCreate(Activity.java:7136)
    at android.app.Activity.performCreate(Activity.java:7127)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
    at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:2)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
    ... 11 more
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/lib/x86, /data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
    at java.util.concurrent.FutureTask.report(FutureTask.java:123)
    at java.util.concurrent.FutureTask.get(FutureTask.java:193)
    at x6.f.g(Unknown Source:28)
    ... 21 more
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk", zip file "/data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/lib/x86, /data/app/androidx.test.tools.crawler-xZ2vnr4Jb8_kw2Er9oP3ag==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/base.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.en.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.x86.apk!/lib/x86, /data/app/com.outafire.myevents-dsiaYFQFA3lGhBlIANSrDQ==/split_config.xxhdpi.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
    at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
    at java.lang.System.loadLibrary(System.java:1669)
    at io.flutter.embedding.engine.FlutterJNI.loadLibrary(Unknown Source:13)
    at x6.f$a.b(Unknown Source:18)
    at x6.f$a.call(Unknown Source:0)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)
i2byvkas

i2byvkas1#

@NdegwaJulius谢谢。这解决了我的问题!你甚至不需要添加ndk过滤器。请按顺序执行以下操作:
1.Flutter通道β
1.Flutter升级3.1.0
1.Flutter清理

  1. flutter构建应用程序包--发布
    注意:默认配置{
    applicationId "com.company.name"
    minSdk版本21
    目标Sdk版本31
    版本代码抖动版本代码. to整数()
    版本名称 Flutter 版本名称
    启用多索引真
    }
4szc88ey

4szc88ey2#

我认为你在描述playstore使用的Google Pixel 2 (virtual)设备时有一个打字错误,因为你的dalvik.system.PathClassLoader在路径列表中显示了各种x86 apk/lib,我自己也在Play Store中看到过这种情况,但它显示了x86用于虚拟Pixel 2使用的ABI。
基本上问题是Flutter不支持x86(32位)架构:https://docs.flutter.dev/deployment/android#what-are-the-supported-target-architectures,这部分源于Dart编译器限制(https://github.com/flutter/flutter/issues/9253)。甚至尝试执行某种NDK转换以在32位设备上运行64位应用的设备也可能会崩溃。调试构建版本可能会工作,因为Flutter "支持在此架构上运行即时(JIT)编译的应用",这可能是您所经历的。**您可以忽略此特定报告,但仍然发布您的应用。**但如果预发布崩溃报告让人感到困扰,您也可以尝试将abiFilters显式添加到您的应用构建版本中。gradle会按照各种或多或少重复的问题中的建议进行限制,以便Play Store测试不会尝试在旧架构上运行:

android {
    defaultConfig {
        ndk {
           abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
        }
    }
}

For more info see https://github.com/flutter/flutter/issues/37396#issuecomment-1207203921:
Flutter不支持提前编译的x86 64位发布构建(AOT)。
Flutter不支持提前编译的x86 32位发布版本,仅支持在此架构上运行即时(JIT)编译的应用。这意味着,你无法生成针对x86 32位设备的Flutter发布版本,但你仍然可以在这些设备上运行调试版本。
非常重要的是要提到,这个问题是针对x86 32位的。x86 64位完全没问题。
谢天谢地,运行x86 32位CPU的Android设备几乎不存在。不过,Google Play使用x86 32位架构的模拟器映像来执行预发布报告。
Android操作系统尝试通过执行本机级转换在x86 32位设备中运行x86 64位,但最终崩溃。
此问题不会阻止您发布应用,您可以忽略预发布报告并将应用发布到生产环境。
然而,我不认为Google Play是100%的错误,相反,问题在于Android操作系统和他们的NDK翻译机制在32位设备上运行64位应用程序,这是问题的根源。

相关问题