Download Google Play Services Emulator

0 views
Skip to first unread message

Sabine Lancour

unread,
Jan 18, 2024, 10:46:30 AM1/18/24
to vibarliti

Now when I start Android Studio and SDK Manager everything looks fine and all tools & packages appear as downloaded, but when I start an emulator to test my app, it says Get Google Play Services which I already have in my gradle as follows:

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.

download google play services emulator


Download Zip https://t.co/deTM7QMZCZ



I want to use Google Play Services API in my application, but when I open the emulator to test my application it sends me a message that says "Google Play Services must be downloaded". I know that occurs because I coded this test in my MainActivity in the method onResume().
I want to know how I can install Google Play Services in my emulator, because soon I will need to test my maps.

I was able to install Google Play and Google Services as separate apks to pure system image api 16 and 17, but they don't really work after that (services crush and play not opens). So seems like it is not possible to make them work on pure AVD image because they should be installed with root access. The same for updating Google Services on AVD system image with Google API preinstalled - can't update because of incompatible certificates, can't uninstall even using adb because don't have access.

I came across another solution to use the Google play services on an emulator. The guys at provide very fast emulators on which you can install Google play services. They just need you to sign up to begin downloading and you need Virtual box installed. At the moment they cater for Android 16 and 17 but more are on the way.

The key is to select the target of your emulator to, for example: Google APIs (ver 18).If you select, for example, just Jellybean 18 (without API) you will not be able to test apps that require Google services such as map.Keep in mind that you must first download the Google API of your favorite version with the Android SDK Manager.

I tried to develop google MAP API V2 application recently and tried to run it through emulator but I everytime it showed me error "Google Play Servcies is not installed in this phone".From my perpective even I think google MAP API V2 doesn't work on emulator.

It seems you do not have installed Google Play services for your emulator. You should install the 3rd last with the name Google API Intel x86 Atom _64 System Image in your Android 9.0 pie.

Sometime it even do not show the map in emulator. So you should wipe your emulator and make sure the settings you are using for emulator are present in your sdk and your project. i.e android version, google api services etc.

Out of the box, the Visual Studio Android Emulator (and the Genymotion emulator, and the Xamarin Android Player) does not support Google Cloud Messaging (GCM) push notifications. The reason for this is that GCM is part of the Google Play Services. And the Google Play Services are not included in the virtual machine (VM) images that the Visual Studio Android Emulator uses.

At that point, your Android VM will support push notifications. You can install of Google Play apps like the Maps application. These steps were tested with Visual Studio Android Emulator but they should work more or less in the same way with the Genymotion and Xamarin emulators.

Genymotion is an incredibly fast, memory-efficient VM that runs the Android OS in a more accurate manner than even the official emulator. Many Android developers do all their device testing using this emulator especially when Google Play services is concerned.

Note: On Ubuntu/Linux, make sure to enable 3D acceleration mode by launching VirtualBox and going to Settings -> Display to fix. VirtualBox appears to prone to memory leaks, so you may find yourself killing the process from time to time. To avoid large CPU consumption by the compiz window manager and swapping in general, try increasing the video memory allocation and Base Memory (found in Settings -> System).

Note: Are you getting an error when starting the emulator? Error Failed to load VMMR0.r0? Follow the advice here. In short, go to virtual box page and download and install VirtualBox 4.3.6 Oracle VM VirtualBox Extension Pack.

Note: If you get Failed to load OVI error when re-adding the emulator, you need to use a new name for the same device. For example, "Nexus 4 - 4.4.4 - API 19" might be called "Nexus 4 - 4.4.4 - API 19 New".

IMPORTANT NOTE: Since version 2.10 Genymotion includes native support for Google Play Services and Google Store. Just open the emulator and click in the "Open GApps" widget showed in the toolbar. More info in Genymotion's blog. If you are working with a previous version you can follow the next steps.

NOTE: These steps need to be followed only if you are using Genymotion < 2.10 and you want to be able to use Google services such as maps and push messaging on your Genymotion device. For basic testing, these steps can be safely skipped.

Download the ARM Translation Installer v1.1 and drag and drop the zip file onto the running Genymotion emulator device. The ARM emulator is only needed for apps that trigger a INSTALL_FAILED_CPU_ABI_INCOMPATIBLE error. See this FAQ for more context.

Note: If you see errors, be sure you installed the correct package above that matches the device version in the emulator. For example, if you install Samsung Galaxy S4 API 18 for Genymotion emulator and install Google Services APK for Android 4.3, Google Play should work without any issue. The important thing is to match the google play API version and Genymotion emulator device version.

If you are encountering issues with a Genymotion device not being detected inside Android Studio, try the following steps. First, close all emulators and unplug any devices. Next, open up the Terminal application on your computer.

Received a message about files being added to the SD card If you are using a Mac, and get this message while dragging over the file to the emulator, make sure to configure your app security settings to allow all applications.

Seeing errors after flashing the emulator? If you see errors, be sure you installed the correct package above that matches the device version in the emulator. For example, if you install Samsung Galaxy S4 API 18 for Genymotion emulator and install Google Services APK for Android 4.3, Google Play should work without any issue. The important thing is to match the google play API version and Genymotion emulator device version.

This article describes the most common warning messages and issuesthat occur while configuring and running the Android Emulator. Inaddition, it describes solutions for resolving these errors as well asvarious troubleshooting tips to help you diagnose emulator problems.

If you see an error about a failure to install the APK on the emulatoror a failure to run the Android Debug Bridge (adb), verify that theAndroid SDK can connect to your emulator. To verify emulatorconnectivity, use the following steps:

If the virtual device you are running in the emulator does not haveGoogle Play Services or Google Play Store installed, this condition isoften caused by creating a virtual device without including thesepackages. When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select one or both of the following options:

Whether you are using Hyper-V or HAXM for hardware acceleration, youmay run into configuration problems or conflicts with other software onyour computer. You can verify that hardware acceleration is enabled(and which acceleration method the emulator is using) by opening acommand prompt and entering the following command:

If the BIOS has not been configured properly to support hardwareacceleration, a message similar to the following example will bedisplayed when you run the emulator-check.exe accel command:

If hardware acceleration is enabled and the BIOS is configuredproperly, the emulator should run successfully with hardware acceleration.However, problems may still result due to issues that are specific toHyper-V and HAXM, as explained next.

If the emulator is not already running, you can start it from thecommand line (rather than from within Visual Studio) to view itsoutput. Typically, Android emulator AVD images are stored at thefollowing location (replace username with your Windows user name):

When you run this command, it will produce many lines of output whilethe emulator starts up. In particular, lines such as the followingexample will be printed if hardware acceleration is enabled and workingproperly (in this example, HAXM is used for hardware acceleration):

If you see an error about a failure to install the APK on the emulatoror a failure to run the Android Debug Bridge (adb), verify that theAndroid SDK can connect to your emulator. To verify connectivity, usethe following steps:

If the virtual device you are running in the emulator does not haveGoogle Play Services or Google Play Store installed, this condition isusually caused by creating a virtual device without including thesepackages. When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select one or both of the following:

If hardware acceleration is not enabled, a dialog may pop up with amessage such as device will run unaccelerated when you deploy yourapp to the Android emulator. If you are not certain whether hardwareacceleration is enabled on your computer (or you would like to knowwhich technology is providing the acceleration), seeHardware acceleration issues below for steps you cantake to verify and enable hardware acceleration.

Whether you are using the Hypervisor Framework or HAXM for hardwareacceleration of the emulator, you may run into problems caused byinstallation issues or an out-of-date version of macOS. The followingsections can help you resolve this issue.

f448fe82f3
Reply all
Reply to author
Forward
0 new messages