remove or update Google play service on emulator - android

i programmed an android app which uses the google maps api v2. i want to test it on the emulator, but to show the map it has a little bit problems. i googled and found the articel, that i have to install to packages (vending.apk, android.gms.apk). i downloaded the packages and installed it. what i did not know is, the installed android.gms.apk is not up to date. when i run the app on the emulator, it shows an button an a message: ...update Google Play services. And now i found the newest version of the .gms.apk. but i am not able to remove or update the google play services on the emulator, because i became the following message from the cmd:
is there a solution for these problem? thx in advance

Installing google service packages; gms and vending
Be sure that emulator started
Copy com.google.android.gms-19032013.apk and com.google.android.vending-19032013.apk files to < bundle root >\sdk\platform-tools from my blog.
Open command prompt and go to < bundel root >\sdk\platform-tools
then run command adb install com.google.android.gms-19032013.apk
then run command adb install com.android.vending-19032013.apk
if it says already exits then run commands
-adb uninstall com.android.vending
-adb uninstall com.google.android.gms
I had similar problems so I prepared step by step tutorial to show how you can use google map android v2 on emulator(android 4.2.2) have a look at to my blog: http://umut.tekguc.info/en/content/google-android-map-v2-step-step

adb uninstall cannot work for system apps is what I am finding out. And Vending and gms are system apps. Therefore adb uninstall com.android.vending causes a failure even if I su. So is there no resolution to this problem?
I can't install it even if I use -r because the certificates are different.

you should try it on android instead of google api's , i am sure it will work for you. because google api's have already installed these apk's.

the below link help you to step by step about google android map
http://umut.tekguc.info/en/content/google-android-map-v2-step-step
download the package from following link
by entering package name
http://www.filecrop.com/search.php?w=com.google.android.gms-19032013.apk&size_i=0&size_f=100000000&engine_d=1&engine_h=1&engine_e=1&engine_m=1&engine_4=1

user2414493 My original reason to try and reinstall is because even with google API 19 my App which mind you works on Samsung s3 and Nexus 4 crashes. Right before it crashes it prints this
Google Play services out of date. Requires 4132500 but found 4033530.
Infact on google API 19 even google Maps is not working completely! I can't get my current location even though I have internet connection and 4g emulated.

Related

This app wont run unless you update googleplayservices in android emulator

What i am doing ::I am trying to use Maps in emulator
My emulator setup::
Error message::
What i have done ::
I have updated the google play services in sdk- still same error
I tried Gennymotion- no play services at present
I saw some people saying API-19 can run map but, still i am not able
to run
i don't have a device
Should i need to do something to update, if so what is it ?
Have you installed these
Install com.android.vending.apk (Google Play Store, v.3.10.9)
Install com.google.android.gms.apk (Google Play Service, v.2.0.12)
apks in emulator.
Follow these steps which I answered for another question..

Map not getting in emulator android api v2

I want to install my map application in emulator it installed fine but not getting map on it,showing error in log cat like Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above, but I am Just seeing zoom buttons and all other UI. What i have to do to get map in emulator in android API v2.
I followed this link: Running Google Maps v2 on the Android emulator
I got finally map in my emulator. I followed these steps to achieve it.
Create avd and start emulator
Go to platform tools path present in Android SDK and put these apk's in it.
Install com.android.vending.apk (Google Play Store, v.3.10.9)
Install com.google.android.gms.apk (Google Play Service, v.2.0.12)
Install these apk's one by one by going to platform tools path by using command prompt(shift+Right click-->open command window here).Follow these commands
adb devices
adb install com.android.vending.apk
adb install com.google.android.gms.apk
Import google-play-services_lib project which is present at project location and add it to your project.(path of lib project:D:\Softwares\android-sdk\extras\google\google_play_services\libproject)
Restart emulator and clean your project and run it through emulator.
That's it. :)
Google Maps API V2 require Google Play Services, which can be downloaded from Play Store, but since emulator doesn't have access to Play store, you cant get Play Services there and in turn the maps. At the moment, referencing the Google Android Map Api v2 you can't run google maps v2 on Android emulator; you must use a device for your tests.
People seem to have trouble with the build in emulator and google maps. As an alternative, you could try this 3rd party emulator. People seem to have better luck with it and google maps. And it's supposed to be faster.
http://www.genymotion.com/
After three days of reading tons and tons of tutorial on how to do this, this is the UP-TO-DATE solution with the UP-TO-DATE files and EASIEST steps to follow.
Steps. 1. Install genymotion emulator (This is way much faster than the eclipse emulator). All about it is easier. Research on how to start it.
Download these three apk's ()
Go to the platform tools folder of your adt bundle instalation folder (your_root_to_your_sdk\sdk\platform-tools). Open the sdk folder and there is the platform tools folder.
Paste the downloaded apks to the platform tools folder
Press Shit and right click the mouse, then press "Open command windows here"
In the cmd type adb devices and hit enter. Then your will use "adb install name_of_the_each_apk" for each of the three apks.
Open the google play and enter your account, and follow the steps: next, install google play services, open maps, and so on, they will guide you. That's all.
AS SIMPLE AS THAT.

Google Play Service Is Not Woking On Emulator

I am trying to test a Simple Map application on Emulator.I also Installed the Following Apks on emulator com.google.android.gms-1.apk and com.android.vending-1.apk and Google Play Store 4110.apk and Here is Preview of My emulator
device 3.2 HVGA SLIER(320480*)
TARGER Google APIs Api Level 15
internal storage 200 mib
sd card 500 mb
Any One Help Me to Get Out of This Issue Plz i am trying Since two days But Map is not loading On emulator
You should test your map application on a real device. I would suggest you to test it on a real device.
There is a work around. Drawing from the below link. I have not tested it. But you can give it a try.
http://blog-emildesign.rhcloud.com/?p=527
Download com.android.vending.apk from
http://www.mediafire.com/download/pxpjfkveemq29qk/com.android.vending.apk
Download com.google.android.gms.apk from
http://www.mediafire.com/download/zn8wna5wf4ek5le/com.google.android.gms.apk
Open eclipse and the AVD Manager and create an AVD with the following configuration:
Start the AVD and wait for it to finish booting, next open you command prompt and install
both apk’s using the “adb install” command. for example:
To install use the following command
adb install com.android.vending.apk
You should receive “SUCCESS” message at the end of the installation process (that may take some time).
When you finish installing both apk files, close the AVD and reopen it. Now you should see a map in your application when you use the AVD instead of this annoying message.
Note : This will work only if you are using google-play-service lib revision #4 in your application (and workspace). If you have already updated google-play-services using the SDK Manager to the latest version (Currently: revision #6) you will receive an error telling you that you that the google-play-services used by your application is too old and needs to be updated:
Further you can check this blog by Emil Adz.
http://blog-emildesign.rhcloud.com/?p=435
You need any of the below to test Google Play Services .apk:
A compatible Android device that runs Android 2.2 or higher and
includes Google Play Store.
The Android emulator with an AVD that runs the Google APIs
platform based on Android 4.2.2 or higher.
Yours is 4.0.3
There's a new emulator called Genymotion that supports play store and google play services

Google Maps v2 doesn't work on Android Emulator

I have followed all steps from http://saleh360.blogspot.in/2012/12/android-running-google-maps-api-v2_12.html but I am not able to make google maps v2 work on android emulator.
When I run my project I get the message:
This app won't run unless you update Google Play services, along with the button "Update".
If I update, it takes me to the Google Play and cannot see the map of my application.
Moreover when I try to import "<android-sdk-folder>/extras/google/google_play_services/samples/maps", I cannot locate the folder maps in my pc, although I got the latest version of Google play services
Has anyone else faced the same problem and found a solution?
I've created a (German) description how to get it working:
http://linuxchef.blogspot.de/2013/05/google-maps-api-v2-im-android-emulator.html
You basically need an emulator with at least API level 9 and no Google APIs. Then you'll have to get the APKs from a rooted device:
adb -d pull /data/app/com.android.vending-2.apk
adb -d pull /data/app/com.google.android.gms-2.apk
and install them in the emulator:
adb -e install com.android.vending-2.apk
adb -e install com.google.android.gms-2.apk
You can even run the native Google Maps App, if you have an emulator with at least API level 14 and additionally install com.google.android.apps.maps-1.apk
Have fun.

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