Why is awsconfiguration.json file missing?

904

Solution 1

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

Solution 2

This might be caused if in the pubspec.yml you have amplify_analytics_pinpoint: ^0.2.0 but didn't add the analytics category by running amplify add analytics

Share:
904
Eshan Singhal
Author by

Eshan Singhal

Updated on December 20, 2022

Comments

  • Eshan Singhal
    Eshan Singhal over 1 year

    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!