Google Play services out of date. Requires 11011000 but found 10289574
Asked Answered
V

8

32

I've been strugling with this problem about week now. Been searching similar topics about this but still can't resolve my problem.

The Prolem is that when i'm trying to run my program on Polar m600 wear or wear emulator (Android V 7.1.1 and API25) they'r giving me this message "Google Play services out of date. Requires 11011000 but found 10289574".

I've followed the "Getting the Last Known Location" part in the android developer site. (Link for the site https://developer.android.com/training/location/retrieve-current.html#play-services)

Here's my Mainactivity code which i'm using

public class MainActivity extends Activity {

private FusedLocationProviderClient mFusedLocationClient;
public Location mLastLocation;
private TextView mTextView;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
    stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
        @Override
        public void onLayoutInflated(WatchViewStub stub) {
            mTextView = (TextView) stub.findViewById(R.id.text);
        }
    });

    mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);
    if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)
            != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION)
            != PackageManager.PERMISSION_GRANTED) {
        return;
    }
    mFusedLocationClient.getLastLocation()
            .addOnSuccessListener(this, new OnSuccessListener<Location>() {
                @Override
                public void onSuccess(Location location) {
                    mLastLocation = location;
                    Log.d("Location is:",""+mLastLocation);

                    if (location != null) {

                    }
                }
            });

}
}

Here's my manifest.xml`

<uses-feature android:name="android.hardware.type.watch" />

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@android:style/Theme.DeviceDefault">
    <meta-data android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <activity
        android:name=".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>
</application>

And last but not least my build.gradle

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "ims.fhj.at.testnavigators"
    minSdkVersion 21
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
     }
  }
 }

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:2.0.3'
compile 'com.google.android.gms:play-services-wearable:11.0.1'
compile 'com.google.android.gms:play-services:11.0.1'}
Via answered 16/6, 2017 at 8:42 Comment(1)
H
64

Create emulator Nexus 5x with Android version O - api 26 - x86 or Android version Nougat - api 24 - x86 Nexus 5x

enter image description here

Then click on the 3 dots in the emulator and this will open the extanded window, there click on Google Play + update. And that will update Google Play Services to the latest update thats 11.0.55 today.

enter image description here

Hoary answered 25/7, 2017 at 20:20 Comment(7)
This is the right answer! Thanks. FYI, you will have to login to the emulator with a Google account to updateDownpour
Wear emulator does not have the "Google Play" tab in settingsAmido
I am getting an error while updating on android emulator Nexus 5x. The error is as following "couldn't sign in,there was a problem communicating with google server.Try again later"Tenderhearted
This answers helps me, but what if we want to test other than nexus 5x and nexus 5? I mean what is the solution of other emulators?Botzow
Just to echo JCricket - if you get the "couldn't sign in error", try restarting the emulator and following the process again. It should prompt you to sign in when trying to update.Mockery
As this option was not available in my emulator. I updated Google Play services in Android SDK. Then it worked.Sn
Heroes doesn't wear only capes, thank you sir ! Even if it doesn't solve the main problem of the thread, I was having the problem with device emulator.Mariann
C
2

You have to downgrade the API in wearable gradle file.

The problem is that your device doesn't have up-to-date Google Play Services application.

To fix it change into this:

compile 'com.google.android.gms:play-services-wearable:10.0.0'
compile 'com.google.android.gms:play-services:10.0.0'
Catechetical answered 16/6, 2017 at 21:31 Comment(0)
B
2

My solution is super weird: Goto Settings -> Apps -> System Apps -> Google Play Store My version was 10xxxxx which is weird because my watch updated on boot. So, I clicked Remove Update and the version changed to 11xxxxxx.

Brokendown answered 8/8, 2017 at 22:55 Comment(0)
N
2

The problem here is the mismatch of google play services (version) on emulator and gradle file.

It can be solved by two ways:

  1. Remove the mismatch by downgrading the version of google play services (version) in gradle file to the Google Play Services (version) of the emulator.

  2. Upgrade the Google Play Services on the emulator.

Nickelson answered 8/9, 2017 at 12:24 Comment(1)
How do you upgrade the Google Play Services on the emulator?Alexina
B
1

As String wrote the Play Services are not updated on the device. Unfortunately In a WearOS world it might be that the Play Services are up-to date, but they are simply not available on the wearables. In that case you can use following methods to react:

GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
int result = apiAvailability.isGooglePlayServicesAvailable(this);
if (result != ConnectionResult.SUCCESS) {
    ... 
} else {
     apiAvailability.getErrorDialog(this, result, REQUEST_CODE,this).show();
}
Barbette answered 11/2, 2019 at 17:18 Comment(0)
K
0

This has been an ongoing issue with Wear for years (see for example Android Wear Google Play Services).

The best solution seems to be to not use the latest Play Services release. One option is to find a minimum version that seems to cover your targeted production devices; in your case, this sounds like something in the 10.2 range. Alternatively, pick the lowest release that includes all the functionality you need (I personally am using 9.8.0).

For reference, here is the Play Services release history: https://developers.google.com/android/guides/releases

Kalmuck answered 16/6, 2017 at 17:21 Comment(0)
G
0

Sometimes this error my occur when you pass the wrong web-client-id value

val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(**web-client-id here**)
                .requestEmail()
                .build()

Use the value in the OAuth client id section indicated Web client (auto created by google service)

Use the value in the OAuth client id section indicated Web client (auto created by google service

Gills answered 23/12, 2018 at 18:27 Comment(0)
D
0

You have to upgrade Google Play Services and APIs for the image your emulator is using. Check out this answer, worked out for me (Android Studio 3.1): https://mcmap.net/q/41103/-updating-google-play-services-in-emulator

Denysedenzil answered 6/3, 2019 at 23:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.