Google Play Services - out of date API 23 - android

Just installed a fresh Android Studio and Marshmallow Platform. I tried to run a GCM app and this happens.
Google Play services out of date. Requires 8487000 but found 8185470
Any ideas?
Thanks

Your phone hasn't auto-updated to Google Play Services 8.4 yet (it only has 8.1), and your app was compiled using Google Play Services 8.4.
Either change the version you are compiling with in the app/build.gradle to 8.1.0:
compile 'com.google.android.gms:play-services:8.1.0'
or wait for your phone to auto-update to the latest version.

You need to update Google Play Services application. You can use GoogleApiAvailability to obtain Intent for launching recover process.

Related

How to add firebase to android project with Google Play Services 14.x

I want to add firebase to my react-native project.
As the documentation says it needs a device running Google Play services 15.0.0 or later.
I have a device which has Google Play Services version 14.7.99 and it is the latest version for my device. (As i understood Google Play Services latest version differs from device to device)
So is there a way to use firebase in devices with Google Play Services version 14?
Thx in advance
As it quite clearly states in the documentation
A device running:
Android 4.1 (API level 14, Jelly Bean) or later
Google Play services 15.0.0 or later
If your device cannot run Google Play Services 15.0.0 or later then there is no way to get Firebase to run on that device.

Android Emulator stuck on "Google Play Services are Updating"

I recently began learning how to create Google Maps activities in Android app development, and have stumbled onto an issue with Google Play Services. Whenever I set my gradle build dependency to compile 'com.google.android.gms:play-services-maps:11.0.4', which is the most recent version of play-services-maps, the emulator screen gets stuck on the following view upon running my maps app:
I have allowed the app to sit there for over an hour, and nothing has changed or updated. As I've read in other StackOverflow questions, I can get the app to properly function by setting my gradle build dependency to an older version, such as compile 'com.google.android.gms:play-services-maps:9.0.0', but this limits my ability to use newer Android features and APIs in my apps, such as FusedLocationProviderClient.
I am running on Nougat 7.1.1, and have installed the following SDKs in an attempt to solve this Google Play Updating issue:
Android SDK Build-Tools
Android SDK Tools
Google Play APK Expansion Library
Google Play services
Support Repository > Google Repository
I haven't found any StackOverflow threads specific to this "Google Play services are updating" message. What can I do to resolve this issue?
Use API 24 or API 26 Android Emulator system images and you should be good to go. API 25 does not have the latest Google Play Store app pre-installed yet. Note on the screen shot that only these images are "Google Play" versions.
In addition to #Jamal Eason's answer, you may use Nexus 5 and Nexus 5X emulators which have Play Store. Check here. You may also try running on real android device connected via USB that supports google maps and having google play service installed.

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

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 authenticate due to the fact of them saying my Google Play Service is not up to date.
I am stump here as I have the latest google play services according to my SDK manager
and I don't think it is my code's problem as when I use my friend's phone for debugging it works but not when I am using the emulator.
How can I update my google play services in the Android Studio built-in emulator.
Since Google introduced Google Play Store images in Android SDK Tools 26.0.0 now emulators comes with installed Google Play Store.
When creating Emulator use images that support Google Playstore (currently Nexus 5 and Nexus 5x with android O)
From 26.0.3
Adds a new tab in the extended window for Google Play Store images that displays the Play Services version and a button to check for updates to Play Services.
Edit:
Make sure that you use emulator with playstore is installed. Check if you have sdk manager -> sdk platforms -> Android 8 -> Google Play ... system image installed. Download it. Create new emulator using that image.
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.
I was facing same issue, but i downgrade my play services version in build.gradle.
settings->apps->Google Play Services application check image
my google play services version is 10.2.98, that's why we need google-play-services(in module level build.gradle) version lower than our emulator's library version.
set the lower version from here, we can see 10.2.6 is better and set it in build.gradle like this
compile 'com.google.android.gms:play-services-places:10.2.6'
and just simple, run app again.
Try to download and install the latest APK for Play Services as stated in this thread.
Based from Google documentation,
If you want to test your app on the emulator, expand the directory for Android 4.2.2 (API 17) or a higher version, select Google APIs, and install it. Then create a new AVD with Google APIs as the platform target.
Try to navigate to settings--> apps in your emulator and then find Google Play Services. Check the version number and use it in you build.gradle. To update it with the latest version, you can see it in these documentation and SO question.
Be noted that updates might not reach all users immediately, so your app should verify the version available before attempting to perform API transactions.

Google Play services out of date in emulator and cannot be updated

I've bumped my project to Google Play Services v8.3.0. But when I start any app that depends on 8.3.0 on the latest API 23 emulator, the version check fails.
Pressing "update" does not work because of course there is no Play Store on the emulator.
For example: try one of these Google's sample projects https://github.com/googlesamples/android-credentials/
Is this just a limitation of the emulator - does not yet have latest Google Play Services? Or is there something that can be done to work around this?
Create a new emulator with the latest android version. This worked for me before.

Differences between google play services client and google play package version

i notice this into my logcat:
I/Google Maps Android API(2924): Google Play services client version: 5089000
I/Google Maps Android API(2924): Google Play services package version: 5089034
i know that these are two different versions of google play services.Can someone tell me the differences between these version?
Should their version be the same?
Package version : Is what you add to your project. (Google play service Lib)
client version : Is the actual version of the google play services installed in your phone.
I wouldn't say that you should always have the "latest" version supported. For example, if you do something like this in build.gradle
compile 'com.google.android.gms:play-services:+'
it will use the latest package version available. But sometimes, an update is released through the sdk to developers much before its counterpart client version hits the Play Store. #Cimat, I believe this reason behind the problem you had. Staying only as updated as the available client version ensures crashes don't happen, while providing you with the upgrades. Android automatically updates the Google Play Services jar anyways, so you need not worry about user laziness.
#amalBit, you're wrong.
client version is what you've added to gradle dependencies.
Package version : Is the actual version of the google play services installed in your phone.
client version : Is what you add to your project. (Google play service Lib)

Categories

Resources