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:-
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.locations" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name ="com.example.locations.permission.MAPS_RECEIVE" android:protectionLevel="signature"></permission> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.locations.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyAZhJllASbTnrFta8hj55shKydSi0ks824"/> </application> </manifest>
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 <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
I am using google maps for this app How can i resolve this?
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
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Remove this
<permission android:name ="com.example.locations.permission.MAPS_RECEIVE" android:protectionLevel="signature"></permission>
not required
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With