How to update Google Play Services to 9.8.7

前提是你 提交于 2019-12-18 05:47:15

问题


I am trying to implement firebase in android project but always getting:
Google Play services out of date. Requires 9877000 but found 9683480
My graddle project/app files look like:

...
compile 'com.google.firebase:firebase-core:9.8.0'
    compile 'com.google.firebase:firebase-database:9.8.0'
    compile 'com.google.firebase:firebase-auth:9.8.0'

}

apply plugin: 'com.google.gms.google-services'

and

dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.google.gms:google-services:3.0.0'

I created Nexus S emulator with API 23 and Target: Android 6.0 (Google APIs) x86_64

Inside emulator Google App Services version is 9.6.83

What should I do to be able to run firebase as don't know what to install or update anymore :/
I am new to android and don't know if I am missing something small.


回答1:


The updated Android tools (which contains the Android Emulator system image) isn't out yet. Only once that is out will your emulators have Google Play Services 9.8, which is a prerequisite for Firebase SDK 9.8.

If you want to test on an emulator, you will have to downgrade your app to Firebase SDK 9.6 for the moment.

If you deploy to a physical device, it'll likely already have the latest version.




回答2:


A possible walkthrough would be to downgrade the emulator's API version (e.g. from 23 to 20) by creating a new emulator (Tools -> Android -> AVD Manager -> Create New Virtual Device. On the second screen, select your prefered (e.g. 20) API version.



来源:https://stackoverflow.com/questions/40249454/how-to-update-google-play-services-to-9-8-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!