wrong google play services version - android

I just made an app for android, so I try to upload it for ditribution through the play store, but when I upload the apk file, an error shows up saying that I use version 5208000 of the google play services, it say that I need to use version 5100000 or lower, it makes no sense it was just the version that the sdk manager downloaded. It does not have an option to download the previous one, I try to use compile 'com.google.android.gms:play-services:5.0.77' but it says that it is not found. How can I download it? I downloaded the google play services for froyo, I tried using the support library and nothing works. How come I cant use the latest version?

Google Play Services 5.2.08 is the Google Fit Developer Preview and not yet available on all devices. You should use 5.0.89 (which replaced 5.0.77 due to issues in 5.0.77) for production apps at this time.

Related

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.

Do devices keep more than 1 version of Google Play services?

I updated one of my apps a few months ago to version 8.3.0 of Google Play services, and that version broke backwards compatibility for some location related APIs.
So my question is, if my device already had Google Play services 8.3.0 installed even when I was running my app using version 6.5.87, how is it possible that it was still working? (Given that the APIs on 6.5.87 are no longer available on 8.3.0) Do devices keep older versions of Google Play services to support backwards compatibility? Or are the removed APIs somehow available on the installed version of Google Play services and hidden on the library shared with developers?
What I'm trying to understand here is if updating Google Play services on my app actually brings background improvements to the app (like using the latest algorithms in the library), or if those improvements are already available as soon as the device installs the new Google Play services version.
EDIT:
After looking into this in more detail I saw that no APIs were actually broke, however some interfaces were converted into abstract classes (see https://developers.google.com/android/guides/releases#september_2015_-_v81) and that is what caused the compilation issues I had back then.
The issue I had happened because version 8.1 of Google Play services was no longer compatible with older versions (because of the change mentioned above), so all the libraries I was using had to be built with 8.1+, if one of them was built with an older version then the compilation failed with this error:
java.lang.IncompatibleClassChangeError: The method 'boolean com.google.android.gms.common.api.GoogleApiClient.isConnected()' was expected to be of type interface but instead was found to be of type virtual (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
EDIT 2:
Even though the issue I faced was not about removed APIs, I found an example of an API that was removed on Google Play services version 7: GooglePlayServicesClient (see Cannot resolve symbol 'GooglePlayServicesClient').
In the release notes of of Google Play Services 8.3 I don't see any note on API calls not available anymore. My guess is that the calls are just deprecated and not removed.
its not automatically available for your app
when update Google play service version you must have to update your app with new version of Google play service code only then your app have new algorithm
if your app have old version of Google play service & device have new version: don't worry your app works fine because your app already have Google play service code in your APK.(device don't keep old version code of Google Play service when update to new one).
if your app have new version of Google play service & device have old: then you must have to ask user update Google play service in his/her device then your app work fine in his/her device
so, its not necessary to device must have more then one version of Google Play service
EDITED: 12-01-2015
I already give you answer of this but still i w'll give you example
I have used Google play service(v 7.8.0) in my app for Location(com.google.android.gms:play-services-location:7.8.0) and for maps(com.google.android.gms:play-services-maps:7.8.0) and current Google Play service Version is 8.4.0 still my app working file why? because some of google play service code attach with my APP code see image below.
I have extract code from APK file. see Google play service code available with APK see package name com.google.android.gms that's why my app wok fine without any issue.
you can also generate your app code see this answer for more detail;

Where can I download the Google Play Services SDK 7.8?

Where can I download the Google Play Services SDK 7.8 even if it is a beta?
I need it for the new Google Proximity Beacon API.
I can not get it with Eclipse or Android Studio.
It seems, that some have it allready.
It is here now: Google Play Services 7.8
The APK already started rolling out, just checked and my Nexus 5 and it's already on 7.8.
The APK is just one part though, and if you want to develop apps with Google Services, you also need the client library:
https://developers.google.com/android/guides/overview
The client library (which is what you add to your app to access the Play Services APIs, and which will later talk to the APK on the phone) is something you download via the Android SDK Manager. The latest available revision is still 25 though, which corresponds to Play Services 7.5.
TL;DR, we're still waiting for Play Services 7.8 with the Nearby API to be released in full.
Client library is released to developers when the rollout of Play Services to most of the devices is done. They are probably doing some staged rollouts this time as well, so we need to wait a little bit more.

Google Play Service library in Android

Hello I am trying to use google-play-services_lib in my android project. As you know in android phone there is Google Play Service APK which provide a some features to you such as location fetching etc.
So I have confusion that Suppose user have Google Play Service APK version is 4.3 and I am using Google Play Services library version is 4.0.30 in android project to build the app.
Do we require same version on both side like build with same latest Google play service library and Google Play Services installed APK to make as like Push Notification, Location fetching work in this case or there is no link between them ?
Thanks in advance
They don't have to match.
The development of the library and the application is not completely dependant, that's why thier version number is different. As far as I know, each release of the services apk defines a maximum version of the library that is supported. So the only conflict could happen when the services apk is outdated (on the target device), and your application's library is a newer one.
The best you can do is to update the library, and the services application on your device.
It should work that way.
I dont think so that there is link between APK and supported libraries in that because the APK silently gets updated about libraries

Need apk for Google Play services with version 4132500

I have an app that is making use of the latest google play services sdk.
The emulators don't seem to come with the latest pre installed, and the 'update' link that pops up during the version check, does not respond.
There are lots of similar questions around these issues, and they all have the same answer, where the apk needs to be installed manually (ie. http://hintdesk.com/how-to-install-google-maps-in-android-emulator-and-use-it-in-intellij-idea/).
However it seems all these other pages refer to older apk versions. I'm using platform v. 4.4.2, API level 19. using 4.4.2 emulator, and getting this exact version error: "Google Play services out of date.Requires 4132500 but found 4033530"
I have tried 2 different sets of vendor and gms apks. ones with date 19032013, and ones with date 20130716
These resulted in the same error but an even older version found:
"Google Play services out of date.Requires 4132500 but found 3025110"
"Google Play services out of date.Requires 4132500 but found 3159132"
BTW, I was also getting the "Failure" issue when trying to uninstall the apks using adb.. I switched to the non API emulator, and was able to uninstall / install other apks.
The "failure" issue is mentioned in the comments of:
Trouble using Google sign-in button in the emulator
I think it's just a matter of using those common steps, but we need newer apk files. How do we get a hold of the ones for version 4132500 ?
I don't want to use the older sdk.. and I don't want to use my real device.. I really need to get the emulator working on the latest sdk.
Does anyone have a line on version 4132500 apks? Or does someone know another way to update google play services on the emulator?

Categories

Resources