编辑:此问题的解决方案是将您的 flutter 版本升级到更新的开发版本 then.1.7.0。您还可以上传单独的 APK 版本,但我个人不喜欢这个选项。请确保您没有从 flutter github 开发存储库下载“错误的构建”,因为那样您将遇到更多需要修复的问题。我用的是1.8.0。
每当我在手机上从 android studio 运行 flutter 应用程序的调试或发布版本时,它就会工作。我刚刚在 Google Play 商店上发布了我的应用程序的私人测试,但现在我的应用程序甚至无法启动。它在日志中给我以下错误:
E/flutter (17419): [ERROR:flutter/runtime/dart_vm_data.cc(19)] VM snapshot invalid and could not be inferred from settings.
E/flutter (17419): [ERROR:flutter/runtime/dart_vm.cc(241)] Could not setup VM data to bootstrap the VM from.
E/flutter (17419): [ERROR:flutter/runtime/dart_vm_lifecycle.cc(89)] Could not create Dart VM instance.
F/flutter (17419): [FATAL:flutter/shell/common/shell.cc(218)] Check failed: vm. Must be able to initialize the VM.
Run Code Online (Sandbox Code Playgroud)
我已将所有插件、flutter 和 gradle 版本升级到最新版本,当我从计算机上运行该应用程序时,该应用程序仍然运行良好。我已经使用过该flutter clean命令并尝试在多个物理设备上运行该应用程序,但没有成功。
我的应用程序是一个本机颤振应用程序(我看到另一个主题有类似的问题,但该解决方案不起作用,因为我的应用程序是一个本机颤振应用程序,而他们的不是),我用来flutter build appbundle生成捆绑包。
其他人遇到过这样的问题并且知道如何解决这个问题吗?