Google Play Services need to update in android studio emulator. But if I press update nothing happens. I am using api 23.1.1. I need to use the op play services to use Google Cloud Messaging. how do you need to update?
Run SDK Manager.exe you will get a pop up of Android SDK Manager. At the bottom u will find Select New or Updates. Then you can select the updated google play services and install the package.
I fixed this issue before by changing a line in my build.gradle file
from:
compile 'com.google.android.gms:play-services:8.3.0'
to:
compile 'com.google.android.gms:play-services:7.+'
Related
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.
I am having Google+ login in my app.I have done all the steps which was mentioned in this link here
The issue is when I run my app it shows "this app will not work unless you update your Google play service".Then I updated my google-play services to its latest version.
later I update the Google-API Intel x86 atom_64 system image under API-21.Still I find the same message to appear.
can't fix this issue need help.Don't know what I am doing wrong.
Check if the feature that you use really needs the latest version of google apis, you can use older versions of the google play services by adding
compile 'com.google.android.gms:play-services:6.5.87'
under dependencies in build.gradle
Try resetting app preferences. Settings>Apps>menu>reset app preferences. This sometimes helps with Play issues.
You have to import google play service from sdk->extras->google->googleplayservices->googleplayservice-lib;
Then rightclick on project -> properties ->add
add the library
to get new version go to sdkmanager->extras->googleplayservice (install or update)
if it is not available then you have to update adt tools and then it will appear.
for that use link
How can I update my ADT in Eclipse?
Im trying to use Google Cloud Messaging with Android Studio, but it cannot find android:name="com.google.android.gcm.GCMBaseIntentService" and the gcm and GcmIntent appears in read. I have intalled Google play services v 6.1.11.
In the build.gradle i have compile "com.google.android.gms:play-services:6.1.11" as dependency.
How, i have that installed.
I had open the google play services directoy and i havent found gcm. I have gcm installed from sdk manager but still doesnt recognize .GCMBaseIntentService and .GcmIntentService
com.google.android.gcm.GCMBaseIntentService is an old deprecated class that belonged to the deprecated gcm.jar. Since you are using Google Play Services library, there's no need for you to use GCMBaseIntentService.
Make sure you update or install 'Google Repository' on the SDK manager. Also make sure that you are pointing to the right SDK path.
Go to:
File>Project Structure> SDK Location
GCMBaseIntentService is depicted and part of play service lib (3.1+) so you don't have to add any other jar file. gcm.jar is obsolete now, you can find it in SDK also.
According to android documentation add below line in gradle.build file (latest version)
dependencies {
compile "com.google.android.gms:play-services:6.5.87"
}
For more info
http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html
And it's aparently not.
I've just compiled an APP with the latest google play services, which I've set on gradle as:
compile 'com.google.android.gms:play-services:+'
But when I open my APP, there's a huge warning.
And in LogCat:
W/GooglePlayServicesUtil﹕ Google Play services out of date. Requires 5208000 but found 5089070
If I open google play (pressing Actualizar button), I can see my Google Play services are totally updated.
This is happening on a genymotion emulator aswell as on a nexus 5 device.
I've tried things like:
compile 'com.google.android.gms:play-services:5.2.8'
However it complains:
Error:Could not find com.google.android.gms:play-services:5.2.8.
Required by:
:mobile:unspecified > :BaseGameUtils:unspecified
Any tips?
Fixed with
compile 'com.google.android.gms:play-services:5.0.89'
I've found out is that my Android Studio is downloading some version of google play services, which is not yet released on Google Play. That means that noone have that latest APK on their devices. So setting gradle to use an older version, will make the trick
Fixed with
For Gradle:
compile 'com.google.android.gms:play-services:5.0.77'
For Eclipse:
Add as library: https://dl-ssl.google.com/android/repository/google_play_services_5077000_r18.zip
If above did not work, try to use older playstore service version of android playstore client.
https://dl-ssl.google.com/android/repository/google_play_services_4132530_r14.zip
https://dl-ssl.google.com/android/repository/google_play_services_4242030_r15.zip
https://dl-ssl.google.com/android/repository/google_play_services_4323030_r16.zip
https://dl-ssl.google.com/android/repository/google_play_services_5077000_r18.zip
https://dl-ssl.google.com/android/repository/google_play_services_5089000_r19.zip
https://dl-ssl.google.com/android/repository/google_play_services_6171000_r21.zip
I am getting "Update Google Play Services" alert when running project on emulator. If I click OK then there is one more alert behind it. I keep clicking OK and there are tons of alerts already popped up and I end up giving up.
Message looks as below :
I've tried updating everything in SDK manager. Also tried in Eclipse, Help->Check for updates.
Updated: Jun 27 2019:
The new google x86 emulator with play services is exactly like a device where you can install apps from play store and all other things.
Previous Answer:
I faced similar problem while trying google maps in emulator. While some people have been able to run google play services in their emulator by downloading google play services application from their mobile, making the apk file and then installing that file in emulator, it is really complicated process and works for certain api level only. Same is the case with emulator using google api's that shift with builtin maps and google play services. The maps application will work in emulator while your application asks for update to google play services. So the wise thing to do is to test it in real hardware.
For me, I had to go to settings | apps on my emulator and then find Google Play Services, I then saw that the version number was no where near the current version number (6.7.74 as against the current 7.3.0)
I then went to my dependencies and changed:
compile 'com.google.android.gms:play-services:7.3.0'
to
compile 'com.google.android.gms:play-services:6.+'
You'll get warnings saying a newer version is available and to avoid using + in version numbers but if you've spent the entire day looking for a solution like I did, you could care less.
In android studio changing the depencies work for me:
com.google.android.gms:play-services:5.+
to:
com.google.android.gms:play-services:5.0.+
Now you can also use your emulator to run Android MAP API V2.
Note: Only Android 4.2.2 and higher versions of the Google APIs platform include Google Play services.
The problem here is that you have an older version of Google Play Services. Update to the latest version by opening the SDK Manager => Extras => Google Play Services.
you can try using new Genymotion Android emulator in which you can update google play services. I have faced this alert and able to update it.
It seems like we can't test latest Google maps API, which is dependant on google play store app which is missing in Google's Android Emulator.
Genymotion Android Emulator comes with Google Play store app.
NOTE: Genymotion v2.0 discontinued packaging virtual machine with google apps , but refer this link to add Google Apps Manually to Genymotion
I had the same issue.
It's nice that in the newer emulators (for version 17 and up) come with the play services included, but what about older versions?
eventually i found the emulators provided by testobject. all their emulators (starting at version 15) come with the updated play services and google APIs (maps v2 etc'), for both ARM and x86.
Check this answer https://stackoverflow.com/a/19734573/3284964. It helped me. For me it works on 4.3 emulator (google play services release 3.2.65) and google play services for froyo lib in my app.
I had a problem with Android Studio when it imported my Eclipse project.
Look for Google Play Services in your build.gradle.
dependencies {
compile 'com.google.android.gms:play-services:+'
}
Change this to use an exact version:
dependencies {
compile 'com.google.android.gms:play-services:5.0+'
}
Then clean build (Build -> Clean Project).
Just did some checking and I realise this question is quite old but, it seems API19 Google Apis Disk Image works with Google Play Services just tested it with an application im working on and it shows the Goolge Maps V2 just fine.
(Only for Android Studio Users)
I have faced the same problem and solved it by updating Android Studio and SDK libraries.