【发布时间】:2021-08-23 10:57:59
【问题描述】:
我最近开始在 Flutter 项目中使用 AWS Amplify 并完成了项目的初始设置,但是当我在运行应用程序时配置 Amplify 时收到以下错误消息:
AnalyticsException(message: Unable to read appId or region from the amplify configuration json., recoverySuggestion: Make sure amplifyconfiguration.json is a valid json object in expected format. Please take a look at the documentation for expected format of amplifyconfiguration.json., underlyingException: org.json.JSONException: No value for pinpointAnalytics)
发生此错误后,我研究了 awsconfiguration.json 文件,发现我的 android 根目录中的 './app/src/main/res' 中没有应包含此文件的原始文件夹。根据 Amplify 文档,我已经运行了 amplify init,添加了多个插件并使用了 amplify push,但是我仍然看不到这个文件,我认为应该在安装过程中自动创建该文件。如有任何帮助,我将不胜感激。
谢谢!
【问题讨论】:
标签: flutter aws-amplify aws-amplify-cli