I am trying to implement my app, following the instructions from https://developers.google.com/android/guides/setup, setting the Google Play Services at 9.8.0 in my build.gradle file. As described in How to update Google Play Services to 9.8.7, for testing on an emulator I should downgrade the service. However, it also indicates it should work on a physical device.
- I am using the new Google Pixel phone which has Google Play Services 9.3.84 installed, Android 7.1.
- The build.gradle file includes:
compile 'com.google.android.gms:play-services:9.8.0'
- Once running the adb debugger shows
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9384448
E/MainActivity: Connection to Google API client has failed
I've updated the Google Play Services in the SDK Manager/Tools (version 37), but am running out of ideas. I am unsure how to downgrade the Google Play Services on the Pixel. Am I missing something (possibly obvious?)
EDTI: See the answer, I was missing the correct version of Google Play Services on the phone. The solution implements a check to prevent future mistakes.