Search code examples
flutteraws-amplifyaws-amplify-cli

Why is awsconfiguration.json file missing?


I recently began working with AWS Amplify in a flutter project and completed the initial setup for the project however get the following error message when I configure Amplify when I run the app:

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)

After this error, I researched about the awsconfiguration.json file and saw that I do not have a raw folder in './app/src/main/res' in my android root which should contain this file. I have run amplify init, added multiple plugins, and used amplify push according to the Amplify docs however I still do not see this file which I believe should be created automatically during setup. I would appreciate any help with the problem.

Thank you!


Solution

  • After trying to setup Amplify in my flutter project a few more times, Amplify seems to configure properly however I am not sure what changed in the project. It seemed to work after I followed the YouTube video below, so if you are having the same problems, it might be worth checking out.

    Link- https://www.youtube.com/watch?v=1seFk3Fkuis