I'm trying to incorporate GCM into my Android app
I've got compile 'com.google.android.gms:play-services:8.3.0'
in my app level build.gradle
I've got classpath 'com.google.gms:google-services:1.5.0'
in my project level build.gradle
My AVD is API23, Target Google APIs.
My Project Structure's Compile SDK version is Google APIS API 23.
From within the AVD i can see the installed Google Play services is v 8.1.85.
So I thought this might be the problem
However I can't install a new apk via 'adb install *.apk' as I'm informed INSTALL_FAILED_UPDATE_INCOMPATIBLE
I have Google Play Services, rev 28 installed in my SDK settings
I'm a beginner on Android so I'm presuming I've overlooked something fundamental!
Unless Google won't update the virtual devices with the new Google Play Services you have to use Genymotion with Google apps.
How to install Google apps in Genymotion: How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device?
Related
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.
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 created an android emulator to test google play services, with the google apis 4.2.2 or greater like this article said
https://developers.google.com/android/guides/setup, but only google maps services is available, and the game I am testing claims for google play services. I am missing something?
You can refer google play services in 4.2.2 emulator
And I will suggest you to use Genymotion instead of using android default emulator. It is like virtual phone and you can also add Gapps in it as well as download any app from Google Play, same as android device.
Genymotion and you can download google apps based on your virtual device version from this Genymotion Gapps link
You have to run an emulator with Target: Google APIĀ“s
Also be sure of compile this:
compile 'com.google.android.gms:play-services:8.3.0'
(Lastest version of google play services) If it doens't run, check for the verion of google play services on the emulator and change the version to compile.
Start SDK Manager. Check APIs in android version you create emulator and install it. Open SDK folder/system-images and delete the emulator image. Start Emulator Manager and dowload new image with api. Start new emulator and it fixed.
I'm trying to make an application using google maps, but in the emulator it does not work in console I see the following error:
W/GooglePlayServicesUtil(1041): Google Play services out of date. Requires 3159100 but found 3136130
On screen I see that I have to update google services ..
My virtual machine is 4.2.2
What do I do? I've searched the forums here .. but no solution that I've tried has worked ..
Install a compatible version of the Google APIs platform. Open the sdk manager and check if you have the updated Google play services.(assuming you use eclipse)
Quoting from the docs.
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.
Note: Only Android 4.2.2 and higher versions of the Google APIs platform include Google Play services.
http://developer.android.com/google/play-services/setup.html
Check the topic under Ensure Devices Have the Google Play services APK.
Make sure you have the latest updates
This is a Google issue. Check this out - https://code.google.com/p/android/issues/detail?id=57880
They've posted a message saying that they will post the updated play services soon. Till then (as of 31 July) you won't be able to run the Google Maps API on your emulator even if you do all the steps required.
Edit: As of September 2013, they've launched an update for it..
In your SDK manager, make sure you've downloaded the latest 'Google play services' or alternatively download them manually and adb install onto the emulator.
I resolved this issue by creating a new avd with target version as : Google APIs(GoogleInc) API Level 18. (platform 4.3 google api required)