Platform Exception (error, java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml google_maps_flutter not working

346

It looks like you are using some kind of Google Mobile Services (GMS) APIs in your app. Google Maps API is one of them. As the error suggests, just add the meta-data to your AndroidManifest.xml to solve the problem. If you read the docs on how to properly set up Google Maps API or other GMS APIs in your app, you can find that you have to define the meta-data on AndroidManifest.xml as well.

Hope this helps.

Share:
346
radlab
Author by

radlab

Updated on December 19, 2022

Comments

  • radlab
    radlab over 1 year

    I added the package to my app putting the meta data with the API key and all that and it was working ok so I started working on other parts of my app and when I tried to use it again some time later it started giving me this exception:

    Unhandled Exception: Platform Exception(error, java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml

    its telling me to add the following to my AndroidManifest.xml:

    <meta-data android:name="com.google.android.gms.version"
          android:value="@integer/google_play_services_version" />
    

    however i didn't need this line before and it was working just fine, why is it asking for it out of nowhere? I added it but now its crashing whenever it tries to load the map saying FATAL EXCEPTION: Thread-3. Can anyone help please?

  • radlab
    radlab almost 4 years
    but as I said, it already worked well without it. Also,I already added the meta-data and now it gives fatal exception and shuts down the app
  • FEBRYAN ASA PERDANA
    FEBRYAN ASA PERDANA almost 4 years
    Perhaps you can check the value or the name of the meta-data? Or can you post a complete stack trace? So I may help further in this matter.