Flutter HMS Core 插件集成报错

Flutter HMS Core Plugin Integration Error

我在我的应用程序中使用 HMS Core 插件(Huawei Location Kit),在 debug 模式下一切正常,但是当我将其切换到发布模式时,它会抛出尽管我可以正常访问华为定位工具,但出现以下错误:

E/flutter (28815): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(-5, -5: Core error, null) E/flutter (28815): Warning: This VM has been configured to produce stack traces that violate the Dart standard.

我不知道是什么导致了这个问题。有什么想法吗?

请问您是否在AppGallery控制台中正确添加了SHA。

请检查您的 json 文件是否在应用程序文件夹中的正确位置。

并且请排除HMS SDK的混淆。