Reputation:
My app is using Google Play Services for location. Also it is using Google Maps. Until today it worked fine but after Eclipse updating and also Google Play Services v13 installation, it is not working any more. Today I have performed several updates. - Android SDK Tools updated to 22.3 - Android SDK Platform Tools updated to 19 - Android SDK Build-tools updated to 19 - Google Play Services updated to 13 Also I have updated ADT
When I start the Application I am getting this error message:
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.
Expected 4030500 but found 0. 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 have worked several times with Google Play Services and also this app has worked fine until now. I did not include any meta-data in the manifest ever.
I have tried to fix the problem including the meta-data tag in my app manifest but it is not working. Currently my app manifest looks like this (this is the same one that the manifest included in my app when it worked).
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp.app"
android:versionCode="2"
android:versionName="1.0.1" >
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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" />
<permission
android:name="com.myapp.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.myapp.app.permission.MAPS_RECEIVE" />
<supports-screens android:requiresSmallestWidthDp="320" />
<supports-screens android:compatibleWidthLimitDp="394" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/CustomizedTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="thecode" />
<activity
android:name="com.myapp.app.ActivityMain"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I am wondering if this issue is due to the google-play-services manifest?
This is the manifest I have found:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="4030530"
android:versionName="4.0.30 (889083-30)" >
<uses-sdk android:minSdkVersion="8"/>
</manifest>
To use the Google Play Services I have followed the instructions given by Google, as in the past and until now I have not found any problem.
Upvotes: 32
Views: 46465
Reputation: 2289
@Javier Did you see the post on "android developers blog" ? They updated google play service app last week. So, Version code is suitable for lib now. It works well. We can use the latest version of "google-play-service-lib" now. I tested it and it works! See this https://android-developers.googleblog.com/2014/01/google-play-services-41.html
Upvotes: 1
Reputation:
if you use google play service revision 13 then must put this meta tag:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
but it not work lower level api like android 2.*. to resolve this problem first install google play service for frayo revision 12 and use it. it works on all api level
Upvotes: 7
Reputation: 22479
The Google Maps getting started 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.
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
Upvotes: 71