i get that my app won't run without Google Play services,which are missing from your phone. but I have added them as a dependency
Check if "play services" are installed and works on your phone. Which version of play services are installed on your phone ?
Only dependencies is not enough for it; you should have Google play Services in the latest version.
You can download Gapps for Emulators in http://opengapps.org/ (select x86 or x86_64 if you can't with ARM) and update them.
I resolved by lowering the version of google play services in dependecies, and it now works on the emulator because the latest version 9.4.0 was not compatible with that of the emulator
Related
I have downloaded a sample project. It requires 10.2.0 Play service, so I can't change the compile version in the build.gradle to lower version.
I have followed the other SO questions:
Android Studio with Google Play Services
How to update Google Play Services for Android Studio 2.2 emulators?
updating Google play services in Emulator
I have also downloaded the latest Google Play service, install the necessary SDKs, clean build project, sync Gradle, use API 24 and API25 for my emulators.
None of it works, my Play service is still using 10.0.8. Below are the screenshots of my Android Studio settings.
Delete the emulator, and in the SDK manager, also delete the SDK platform on which that emulator was built.
Then, re-download that SDK platform and re-build your emulator.
Why?
If there have been updates to Google Play Services since you've downloaded said SDK platform and built that emulator, the legacy version of Google Play Services is probably still in that SDK platform's build.
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 integrating Google Plus Sign In for my app. The only thing is I have everything updated in Android SDK but still when I run my app in Android Emulator, I get a error in Android Studio saying "Google Play services out of date. Requires 7327000 but found 6774480".
Android Studio doesn't allow me to use older version of Play Services.
I searched different ways to install latest Google Play Service offline (.apk) but it gives incompatibility error when run using "adb install gps.apk".
How is it like even the latest Android OS image has old version of Google Play Service installed and not even a update indicator in Android SDK for these services?
Use APK MIRROR, it contains all version of Google Play Services.
P.S. Remember to uninstall already installed version of Google PlayService from the device before installing the new one.
Thanks Murtaza for contributing to this but I found the solution in between all this. I was using Google API image in Emulator where the Google Play Services are already installed.
So we have 2 options of Uninstalling/Reinstalling them, of which NONE worked.
What I did was downloaded the APK from your given link and installed it on the Emulator without Google API image. It successfully installs in there and I got the updated Google Play Service installed on the Emulator.
I've tried to install Google Play on the emulator. I've followed the instruction from Google Dev Site.
Using ADV manager it seems ok, devices are targeting Google API version 22, but when I run my image I always have an "This app won't run unless you update Google Play services"
My test program works fine on a real device
The dependencies includes this:
dependencies {
compile 'com.google.android.gms:play-services:7.3.0'
}
I've tried to manually add the Google Play apk:
> adb install -r com.google.android.gms-7.3.29_\(1866531-038\)-7329038-minAPI9.apk
4503 KB/s (37113767 bytes in 8.048s)
pkg: /data/local/tmp/com.google.android.gms-7.3.29_(1866531-038)-7329038-minAPI9.apk
So is there a way to check emulator is running with Google Play services? If no, how to solve the problem?
I had to create an emulator with Google API 21 (and not 22) and it worked... See #selvin remarks
Please install "Google APIs ARM EABI v7a System Image" API 22 to access Google Play services on emulator.
I faced the similar issue, so i changed google play services version in my build.gradle file from 8.1.0 to 7.8.0. I think the Problem is because your application is using higher version of google play services then the version which is installed on emulator. Above is the work around, don't know the solution yet.
I had the same issue. I deleted the google play services in the SDK manager (see pic). And then re-installed it. Then try restarting the SAME emulator and hopefully the app works!
This is a very annoying issue. It can also be solved with downgrading your build.gradle file as mentioned by Fenil, where the x.x.x have changed by now.
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.