How to update Google Play Services on the emulator in Android Studio

前端 未结 4 774
鱼传尺愫
鱼传尺愫 2020-12-28 09:14

Hi I am trying to run an Android Program I have created that can connect to Firebase with Authentication using email and password but it seems that I cannot even authenticat

4条回答
  •  生来不讨喜
    2020-12-28 09:43

    I had the same issue and spent half a day working it out.

    In your emulator, go to settings->apps->Google Play Services and compare the version used to what appears in your build.gradle file.

    In my case the emulator was running an earlier version and no amount of updates seemed to change it.

    In build.gradle, I changed the following:

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

    to

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

    After which I restarted android-studio and it worked flawlessly.

提交回复
热议问题