我最近添加的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文件夹的应用程序级build.grade
文件中添加了shrinkResources false
。如果这有帮助,请告诉我。