发布模式下 quick_actions 插件的 MissingPluginException

问题描述

我最近添加的 quick_actions 插件在调试模式下运行良好,但在发布模式下显示空白屏幕。

在日志中发现这些问题。

[ERROR:Flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method getLaunchAction on channel plugins.Flutter.io/quick_actions)
    #0      MethodChannel._invokeMethod (package:Flutter/src/services/platform_channel.dart:157)
    <asynchronous suspension>
    #1      quickactions.initialize (package:quick_actions/quick_actions.dart:68)

[ERROR:Flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method setShortcutItems on channel plugins.Flutter.io/quick_actions)
    #0      MethodChannel._invokeMethod (package:Flutter/src/services/platform_channel.dart:157)

解决方法

我在 google_fonts 包中发现了同样的问题。截至目前,为了从发布模式中删除此问题,我在 android 文件夹的应用级别 shrinkResources false 文件中添加了 build.grade。如果这有帮助,请告诉我。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...