AndroidStudio emulator "won't run unless you update Google Play Services"

41,944

Solution 1

I downgraded the SDK from 5.1 to 5.0 and it's working.

Solution 2

Navigate to settings--> apps in your emulator and then find Google Play Services, check the version number and use it in you build.gradle

Hope this helps

Solution 3

Change the SDK in your emulator to v21 or lower. Physical devices are not effected by this issue.

The reason Android is complaining about an update for Google Play services is related to a known issue in Android emulators for API v22 and up (at this time 23). https://code.google.com/p/android/issues/detail?id=176348

You should try to use the latest version of Play Services in your build script as users are generally forced to have the latest version of this on their device.

Solution 4

I had the same issue. But I followed the following things
1) First download the latest build tools and play services in Android SDK 
Android Studio -> Tools -> Android -> SDK Manager -> SDK Tools -> Android SDK Build Tools -> Install them 
& install Play Services by following same steps 

2) Create a new emaulator with latest api level for ex( API level : 28)

3) Run the app in the latest emulator 

It will work fine.

Solution 5

This problem occurred when I start my application on emulator Android 5.1.1 (x86_64) - API 22. I have read some discussions about it, but no one from them helped me.

I tried to adjust version of Google Play Services in gradle build script (I mean you should update the script with "app" name). Don't forget to sync gradle when you update something in your script.

My gradle script "app" after updates:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"
    defaultConfig {
        applicationId "com.itmm.map"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.google.android.gms:play-services:9.0.0'
    testCompile 'junit:junit:4.12'
}

Please, have a look into dependencies section. You're interesting in the follwoing line of script:

compile 'com.google.android.gms:play-services:9.0.0'

Currently, ver. 9.0.0 helps me and everything is ok. I can see MapActivity on Android emulator. 9.0.0 is not a newest version of Google Play Services (the newest is 9.6.1), but it works and it can solve your problem, if you aren't interestion in new features of ver. 9.6.1.

Share:
41,944
Raphael Teyssandier
Author by

Raphael Teyssandier

I'm student at Epitech school, i learn C/C++ and other langage, and by my self Java/Android.

Updated on July 28, 2022

Comments

  • Raphael Teyssandier
    Raphael Teyssandier almost 2 years

    I have this problem with my emulator, i'm using API 5.1.1 and i have the lastest version of Google Play Services from SDK Manager.

    AndroidManifest.xml:

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

    In the build.grable:

    compile 'com.google.android.gms:play-services:+'
    

  • Raphael Teyssandier
    Raphael Teyssandier over 8 years
    You have right, my version on my emulator is 6.7.74. How to update it with the lastest version ?
  • vab
    vab over 8 years
  • Amir
    Amir over 7 years
    I have downgraded from compile 'com.google.android.gms:play-services:10.0.0' to compile 'com.google.android.gms:play-services:9.0.0' and this solved my problem. up +1
  • Amir
    Amir over 7 years
    I have downgraded from compile 'com.google.android.gms:play-services:10.0.0' to compile 'com.google.android.gms:play-services:9.0.0' and this solved my problem. up +1
  • Mairyu
    Mairyu almost 7 years
    my Emulator shows 10.2.98, but that doesn't seem to exist (gradle rejected it), but it works fine with downgrading to 9.0.0 (I had changed to 11.0.0)
  • Olkunmustafa
    Olkunmustafa about 6 years
    When I downgrade my Google play service in my build.gradle, the neccessary methods and classes is not working