Genymotion 2 - No Connection on Google Play Store - android

I'm using Genymotion 2.0.3 and following this guide to install Google Play Services for a Galaxy Nexus 4.1.1 API 16 device.
When launching Play Store I get "No Connection".
However, I am able to browse etc. So there is definitely a working internet connection.
I tried two different Google accounts just to check and also tried all three Google Apps downloads (4.1 version does not flash) all with the same result.
I have an old 1.x virtual device from the previous version of Genymotion (4.1.1 with Google Apps) and Google Apps works perfectly there.
Anyone have any suggestions on how to get Google Apps working for Genymotion 2.0.x and a 4.1.1 device?

You probably installed incompatible app services. Please download correct version compatible with your API from here. I had similar issue when I had API18, but downloaded services for API17.

You have to download the exact version of gapps to match the device API that you wish to run on. By default Genymotion does not come with gapps. To download gapps click on any of the link below. You can only drag and drop the setup on to Genymotion if it is signed already. So please download the signed gapps.
http://www.androidfilehost.com/
http://wiki.cyanogenmod.org/
http://goo.im/

in GenyMotion, download the device with gapps prebuilt.

Related

Google Play Services on Genymotion emulator with Android 7

I have purchased Genymotion with the goal to have a simulation with Android 7.0 and Google Play.
Android 7.0 runs fine on Genymotion, but I am not able to install Google Play on it.
Google Play works fine for Android 6.0 and below - I was able to find the sources (Flashes) that must be installed additionally for using Google Play in Genymotion.
Does someone know how to install Google Play on an Android 7.0 Device with Genymotion?
Updated answer
Since Genymotion 2.10, you are able to install Google Play Services within ease without dealing with zip files. You now have a 1-click installer (called "Open GApps" widget).
Here are few notes to consider:
The 1-click installer is available for every device running Android 4.4 or more (whether new or already created), as long as Genymotion 2.10 is installed.
The Open GApps widget installs the smallest variant (i.e. pico) as it fits most development and testing needs.
That means you only get Google Play Store and Google Play Services and nothing else.
If you need access to further Google apps, you can either visit the Play Store and download them from there or you can install another variant of Open GApps from their website, as describe in my original answer.
How to use the widget and install Open GApps
Just open your Genymotion device.
You will see a gray Open GApps logo on the right bar, alongside with all the other settings:
When you click on that logo, Genymotion will start downloading Open GApps to your device:
Then, you will need to restart your device and you're all set:
Original answer
In order to install Google Play and use it on Genymotion, you will need to find a zip file of the pre-built Google Apps packages to onto the emulator.
As mentioned in the comments to your question, Genymotion's ROM is compiled to x86 to match the most popular computer's CPU architecture.
However, most of the pre-built Google Apps packages available are using ARM architecture, which is popular among phones.
Some of the comments mentioned the need for installing an ARM Translation which will let those ARM apps to run on the x86 virtual device, but it might be difficult to find the right translation file for Android Nougat and anyway that it not necessary at all.
You are able to go to the open GApps site and install the needed pre-built Google Apps packages that you desire.
Make sure to choose Platform: x86 and the proper Android version.
In order to install it on Genymotion just drag and drop the zip file into the emulator and you will be prompted with the following message which lets you know that the file can be flashed to the device:
Click OK and it will flash the file.
When the process is done you will be prompted with the following message:
All you need to do is to restart the device emulator and you will have Google Play on your Android Nougat emulator.
Enjoy.
Since Genymotion 2.10, Gapps can be installed automatically from within Genymotion!
Top right of the Genymotion emulator window, you will find a 'Gapps' button: click on it and Genymotion will do the rest: downloading the correct GApps bundle and install it in your Android image!
Once installed, just restart this emulator: the Gapps button now have a green check mark on it and the Open Gapps (Pico) bundle has been installed for the specific version of Android you are running :-)
Works for Android 4.4 onwards.
Read more at
https://www.genymotion.com/blog/2-10-open-gapps-widget/
UPDATED ANSWER
As #pascal pointing out (kudos to #pascal), since Genymotion 2.10 Google Play Service and Play Store can be automatically installed.
Here is the news from Genymotion 2.10 – Seamlessly install Google Play Services and Play Store:
Genymotion 2.10 is out! And it comes with a 1-click installer for Google Apps
Simply download and install Genymotion 2.10 and a new “Open GApps” widget will be available in your toolbar. Click it and it’ll do the rest!
Now you can have your applications relying on Google Play Services and Google Play Store working perfectly fine. No more fumbling around with random zip files and tutorials found there and there!
OLD ANSWER
Quoting myself from https://stackoverflow.com/a/40712778/4758255:
There is official FAQ for using Google Play in How do I install Google Play Services?, here the FAQ text:
For intellectual property reasons, Google Play Services are not
included by default in Genymotion virtual devices. However, if you
really need them, you can use the packages provided by OpenGapps.
Simply follow these steps:
Visit opengapps.org
Select x86 as platform
Choose the Android version corresponding to your virtual device
Select nano as variant
Download the zip file
Drag & Drop the zip installer in new Genymotion virtual device (2.7.2 and above only)
Follow the pop-up instructions
Please note Genymobile Inc. and Genymotion assume no liability
whatsoever resulting from the download, install and use of Google Play
Services within your virtual devices. You are solely responsible for
the use and assume all liability related thereto. Moreover, we
disclaim any warranties of any kind for a particular purpose regarding
the compatibility of the OpenGapps packages with any version of
Genymotion.

Google play services problems in emulator [duplicate]

For the emulator I have below, I am getting the error message that "Google Play Services not installed on the device".
As per the developer site, it says that 'The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
Not able to understand if the emulator is running 4.4.2 then why is google play services not present?
Some related threads, but no resolution. (adding these just to point out this issue is not a duplicate):
Related Thread
Related Thread
http://developer.android.com/google/play-services/setup.html
Quoting 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.
Needs Emulator of Google API"S
See the target in the snap
Snap
I prefer testing on a real device which has google play services installed
You will not able to test the app using the Google-Play-Service library in emulator. In order to test that app in emulator you need to install some system framework in your emulator to make it work.
https://stackoverflow.com/a/11213598/1405008
Refer the above answer to install Google play service on your emulator.
If you happen to not have the image, download it via the SDK manager:
If you're using Xamarin, I found a guide on their official forum explaining how to do this:
Download the package from the internet. There are many sources for this, one possible source is the CyanogenMod web site.
Start up the Android Player and unlock it.
Drag and drop the zip file that you downloaded onto the Android Player.
Restart the Android Player.
Hereafter, you might also need to update the Google Play Services from the Google Play Store.
Hope this helps for anyone else who has troubles finding the documentation.
Setp 1 :
Download the following apk files.
1)com.google.android.gms.apk (https://androidfilehost.com/?fid=95916177934534438)
2)com.android.vending-4.4.22.apk (https://androidfilehost.com/?fid=23203820527945795)
Step 2 : Create a new AVD without the google API's
Step 3 : Run the AVD (Start the emulator)
Step 4 : Install the downloaded apks using adb .
1)adb install com.google.android.gms-6.7.76_\(1745988-038\)-6776038-minAPI9.apk
2)adb install com.android.vending-4.4.22.apk
adb come up with android sdks/studio
Step 5 : Create the application in google developer console
Step 6 : Configure the api key in your Androidmanifest.xml and google api version.
Note :
In step1 you need to download the apk based on your Android API level(..18,19,21..) and google play services version (5,5.1,6,6.5......)
This will work 100%.
google play service is just a library to create application but in order to use application that use google play service library , you need to install google play in your emulator.and for that it need the unique device id. and device id is only on the real device not have on emulator. so for testing it , you need real android device.

updating Google play services in Emulator

I have gone through many questions like this on Google Play, I am using Android 4.2.2 API 17.
My app requires Google play services 8.1 , It compiles fine and when it runs on emulator it shows message that 'You need to update your Google play services ' ,
When I click on update nothing happens,
How can I update the Google Play services without downloading any latest API version ?
Update On 18-Dec-2017
You can update Google Play Services via the Play Store app in your emulator just as you would on a physical Android device from API 24.
check Emulator new features added with stable update from Android Studio v 3.0
Google Play Support - From Google : We know that many app developers use Google Play
Services, and it can be difficult to keep the service up to date in
the Android Emulator system images. To solve this problem, we now
offer versions of Android System Images that include the Play Store
app. The Google Play images are available starting with Android Nougat
(API 24). With these new emulator images, you can update Google Play
Services via the Play Store app in your emulator just as you would on
a physical Android device. Plus, you can now test end-to-end install,
update, and purchase flows with the Google Play Store.
Quick Boot - Quick Boot allows you to resume your Android Emulator
session in under 6 seconds
Android CTS Compatibility
Performance Improvements - With the latest versions of the Android
Emulator, we now allocate RAM on demand, instead of allocating and
pinning the memory to the max RAM size defined in your AVD.
Virtual sensors
Wi-Fi support
GPS location and Many more...
OR
Update this SDK Build-Tools and Android Emulator to latest and this alert message will not come again,
Settings --> Android SDK --> SDK Tools(tab) --> Android SDK
Build-Tools
Use/ emulate a system-image that has "Play Store" pre-installed, those with "Google Play" in targets column (instead of Google APIs). Updating play services would be as easy as in real device.
Since Google introduced Google Play Store images in Android SDK Tools 26.0.0 now emulators comes with installed Google Play Store.
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.
But even with all above (last checked 2022), you can NOT use the Emulator to test Google Play Billing:
You must install your application on a real device to test Google Play Billing,
Or, ask Google for "closed testing" permission.
see How to test In-app Billing on an emulator?
You need install Google play image,
Android SDK -> SDK platforms --> check show Package details --> install Google play.
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.
Running the app on a virtual device with system image, 'Google Play API' instead of 'Google API' will solve your issue smoothly..
Virtual devices Nexus 5x and Nexus 5 supports 'Google Play API' image.
Google Play API comes with Nougat 7.1.1 and O 8.0.
Just follow the below simple steps and make sure your pc is connected to internet.
Create a new virtual device by selecting Create Virtual Device(left-bottom corner) from Android Virtual Devices Manager.
Select the Hardware 'Nexus 5x' or 'Nexus 5'.
Download the system image 'Nougat' with Google Play or 'O' with Google Play. 'O' is the latest Android 8.0 version.
Click on Next and Finish.
Run your app again on the new virtual device and click on the 'Upgrade now ' option that shows along with the warning message.
You will be directed to the Play Store and you can update your Google Play services easily.
See your app runs smoothly!
Note: If you plan to use APIs from Google Play services, you must use the Google APIs System Image.
the answers on this page eluded me until i found the show package details option
My answer is not to update the Google play service but work around.
Get the play service version of the emulator by using the following code
getPackageManager().getPackageInfo("com.google.android.gms", 0 ).versionName);
For example if the value is "9.8.79" then use the nearest lesser version available com.google.android.gms:play-services:9.8.0'
This will resolve your problem. Get the release history from https://developers.google.com/android/guides/releases#november_2016_-_v100
I know it's late answer but I had same problem for last two days, and none of the above solutions worked for me. My app supports min sdk 16, Jelly Bean 4.1.x, so I wanted to test my app on emulator with 16 android api version and I needed Google Play Services.
In short, solution that worked for me is:
make new emulator Nexus 5X (with Play Store support) - Jelly Bean 4.1.x, 16 API level (WITHOUT Google APIs)
manually download apks of Google Play Store and Google Play Services (it is necessary that both apks have similar version, they
need to start with same number, for example 17.x)
drag and drop those apks into new emulator
congratulations you have updated Google Play Services on your 4.1.x emulator
Here are the steps and errors I have encountered during the problem.
So I have made new emulator in my AVD. I picked Nexus 5X (with Play Store support). After that I picked Jelly Bean 16 api level (with Google APIs). When I opened my app dialog pop up with message You need to update your Google play services. When I clicked on Update button, nothing happened. I did update everything necessary in SDK manager, but nothing worked. I didn't have installed Google Play Store on my emulator, even tho I picked Nexus 5X which comes with preinstalled Play Store. So I couldn't find Google Play Store tab in Extended Controls (tree dots next to my emulator).
Because nothings worked, I decided to try to install Google Play Services manually, by downloading APK and dragging it into emulator. When I tried this, I encountered problem The APK failed to install. Error: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES. I figured that this was the problem because I picked Jelly Bean 16 api level (with Google APIs). So I made new emulator
Nexus 5X (with Play Store support) - Jelly Bean 16 api level (WITHOUT
Google APIs)
This allowed me to install my Google Play Service manually. But when I run my app, it still didn't want to open it. Problem was that my emulator was missing Google Play Store. So I installed it manually like Google Play Service. But when it was successfully installed, dialog started popping out every second with message Unfortunately Google Play Services has stopped. Problem was that version of my Google Play Store was 17.x and Google Play Service was 19.x. So at the end I installed Google Play Service with version 17.x, and everything worked.
I faced the same issue. I updated my Android studio and used API 25 target as Android 7.1.1 and X86 and everything worked fine. I use Google play services and firebase for my project
I was having the same issue. Just avoid using an emulator with SDK 27. SDK 26 works fine!
2020 , the error
Google Play services out of date. Requires 12451000 but found 11743470
just update Google Play services from the Google Play after you sing-in with a valid account.
PS: I've tried different Emulator versions, but all required to update google play services.
Update your google play services or just create the new emulator.
When you install the new emulator this problem will automatically be solved.
Happy coding :)

Google Play Services Missing in Emulator (Android 4.4.2)

For the emulator I have below, I am getting the error message that "Google Play Services not installed on the device".
As per the developer site, it says that 'The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
Not able to understand if the emulator is running 4.4.2 then why is google play services not present?
Some related threads, but no resolution. (adding these just to point out this issue is not a duplicate):
Related Thread
Related Thread
http://developer.android.com/google/play-services/setup.html
Quoting 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.
Needs Emulator of Google API"S
See the target in the snap
Snap
I prefer testing on a real device which has google play services installed
You will not able to test the app using the Google-Play-Service library in emulator. In order to test that app in emulator you need to install some system framework in your emulator to make it work.
https://stackoverflow.com/a/11213598/1405008
Refer the above answer to install Google play service on your emulator.
If you happen to not have the image, download it via the SDK manager:
If you're using Xamarin, I found a guide on their official forum explaining how to do this:
Download the package from the internet. There are many sources for this, one possible source is the CyanogenMod web site.
Start up the Android Player and unlock it.
Drag and drop the zip file that you downloaded onto the Android Player.
Restart the Android Player.
Hereafter, you might also need to update the Google Play Services from the Google Play Store.
Hope this helps for anyone else who has troubles finding the documentation.
Setp 1 :
Download the following apk files.
1)com.google.android.gms.apk (https://androidfilehost.com/?fid=95916177934534438)
2)com.android.vending-4.4.22.apk (https://androidfilehost.com/?fid=23203820527945795)
Step 2 : Create a new AVD without the google API's
Step 3 : Run the AVD (Start the emulator)
Step 4 : Install the downloaded apks using adb .
1)adb install com.google.android.gms-6.7.76_\(1745988-038\)-6776038-minAPI9.apk
2)adb install com.android.vending-4.4.22.apk
adb come up with android sdks/studio
Step 5 : Create the application in google developer console
Step 6 : Configure the api key in your Androidmanifest.xml and google api version.
Note :
In step1 you need to download the apk based on your Android API level(..18,19,21..) and google play services version (5,5.1,6,6.5......)
This will work 100%.
google play service is just a library to create application but in order to use application that use google play service library , you need to install google play in your emulator.and for that it need the unique device id. and device id is only on the real device not have on emulator. so for testing it , you need real android device.

Missing Google Play Services from AVD

I recently started developing for Android, and I have come into trouble when trying to use Google Maps in my app. I downloaded the Google Maps API v2 for Android, and have already performed all the required steps according to Google Developers Site.
My problem is that although the app runs, in the place where the maps should be displayed there is a texts saying that my device is missing Google Play Services.
I have already downloaded the Google Play Services from the SDK, imported the library into my project and also importing the .JAR file.
I am using Netbeans, not Eclipse, so many solutions I have found over the web aren`t useful for me. I hope you can help me with this.
Unfortunately, you can't use the emulator to run apps that use Google Play services. From http://developer.android.com/google/play-services/setup.html: "Google Play services is not supported on the Android emulator — to develop using the APIs, you need to provide a development device such as an Android phone or tablet."
From google's own site http://developer.android.com/google/play-services/setup.html
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.
I had this same problem and found solution:
Here are the updated gms and vending files. Same instructions as before: Create a new emulator with any cpu/abi, a non google-api target (versions 10-17 work) and gpu emulation on or off, and then install the files:
adb install com.android.vending-20130716.apk
adb install com.google.android.gms-20130716.apk
If you are upgrading an existing emulator then you might need to uninstall previous versions by:
adb uninstall com.android.vending
adb uninstall com.google.android.gms
Bellow link contains a solution that works with Android 4.2.2 or higher
How to install Google Play Services in Android Emulator
1.1 Start your emulator. Disconnect any other Android device (such as your smartphone) from computer.
1.2 Download these two files
com.android.vending-19032013.apk : http://www.mediafire.com/download.php?7jfar2v1bzx6v59
com.google.android.gms-19032013.apk : http://www.mediafire.com/download.php?4o9fz413uavlblf
1.3 Open command console, go to \platform-tools
Install two files above with command
adb install \com.android.vending-19032013.apk
adb install \com.google.android.gms-19032013.apk
Yes, you can use Google maps on emulator. However, it's not officially supported, so takes some work. I had the best success following the info on this link.
I found this, i hope it helps you ;)
Installing Google Play on Android Emulator
Run Google Play Services in your emulator
If anyone is still experiencing this issue, first try to create your emulator with the Google API's as the platform target. After doing so, I noticed that my Google Play Services was not the correct version on the emulator.
While trying to hack together a solution, I stumbled upon the GoogleApiAvailability class here. Google did a phenomenal job handling compatibility issues.
GoogleApiAvailability.isGooglePlayServicesAvailable(Context) returns an integer status code, which can be fed directly into getErrorDialog(Activity, errorCode, requestCode) which returns a Dialog that works perfectly right out of the box. If your Play Services are out of date, the dialog will redirect you to an updater... If they are missing, it will redirect you to an installer, etc...
Thought I would share this great feature in case anyone is looking for a fix that would work in production code as well as testing.

Categories

Resources