A required meta-data tag in your app's AndroidManifest.xml does not exist.

匿名 (未验证) 提交于 2019-12-03 01:13:01

问题:

I am developing a google maps app for android.

But, somehow my application crashes giving an error like :

java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml does not exist.  

This is what my AndroidManifest.xml looks like:-

Log:-

01-09 12:29:35.249: E/AndroidRuntime(7448): Caused by: java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml does not exist.  You must have the following declaration within the  element:     

I am using google maps for this app How can i resolve this?

回答1:

Missing the below in application tag of manifest. This ia new requirement as of updated google play services.

Check the topic Add the Google Play services version to your app's manifest @

https://developers.google.com/maps/documentation/android/start

 

Remove this

not required



回答2:

Google Map V2 add new feature in AndroidManifest.xml. You will need to add this metatag within application tag



回答3:

Try to add following meta-data tag on Manifest file it's working fine.



回答4:

The Google Maps getting started https://developers.google.com/maps/documentation/android/start

guide says:

Add the Google Play services version to your app's manifest

Edit your application's AndroidManifest.xml file, and add the following declaration within the element. This embeds the version of Google Play services that the app was compiled with.



回答5:

There is no need for permission:

A tag including the google services might do the trick.



回答6:

Try cleaning your project (select project>project tab>clean)

I solved my problem with this. Cleaning is the solution for most problems.



回答7:

As Google Map V2 use use Google Play services you need to keep it updated. Latest google play services requires a version name, which is to be mentioned using inside AndroidManifest.xml. This can be solved by both of the below ways_

1. Add following meta-data inside application tag of your AndroidManifest.xml

this value is there in your Google Play services library(res -> values -> version.xml)

2. Directly add the version code like

4030500 is version code which is stored inside

google-play-services_lib>res>values>version.xml

Like

4030500


回答8:

If you update your google play services you need to update your res/values tag too.



回答9:

As I read all the post ,in my case I just add these snippets and work wonderfully



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!