How to download Google Play Services in an Android emulator?

后端 未结 12 1134
借酒劲吻你
借酒劲吻你 2020-11-22 15:26

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

相关标签:
12条回答
  • 2020-11-22 15:46

    I got it working by

    • Installing the Google Play Services through the Android SDK Manager
    • Using a Galaxy Nexus Device (4.65", 720 x 1280: xhdpi)
    • Targeting the Android 4.2.2 Google API Level 17
    0 讨论(0)
  • 2020-11-22 15:47

    To the latest setup and information if you have installed the Android Studio (i.e. 1.5) and trying to target SDK 4.0 then you may not be able to locate and setup the and AVD Emulator with SDK-vX.XX (with Google API's).

    See following steps in order to download the required library and start with that. AVD Emulator setup -setting up Emulator for SDK4.0 with GoogleAPI so Map application can work- In Android Studio

    But unfortunately above method did not work well on my side. And was not able to created Emulator with API Level 17 (SDK 4.2). So I followed this post that worked on my side well. The reason seems that the Android Studio Emulator creation window has limited options/features.

    Google Play Services in emulator, implementing Google Plus login button etc

    0 讨论(0)
  • 2020-11-22 15:50

    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.

    Solution

    Then I tried to run the same example on my Sony Experia you and again it showed me same error. Then I installed google play services on my mobile and amazingly it started working..:)))

    0 讨论(0)
  • 2020-11-22 15:53

    In the current version (Android Studio 0.5.2) there is now a device type for "Google APIs x86 (Google Inc.) - API Level 19".

    0 讨论(0)
  • 2020-11-22 15:54

    Go to https://university.xamarin.com/resources/working-with-android-emulators . Scroll down to the "Installing Google Play Services" section. Step by step walk through there.

    Directly plagarized from xamarin here so I don't get dinged for linking and not including solution. Posting this as I found the hit in stack before I found the solution that worked across the board on the xamarin page.

    1. Start the Xamarin Android Player and run one of the supplied images, the following assumes you have started the KitKat Nexus 4 image. Download the proper Google Play Services .zip file from www.teamandroid.com/gapps/ . Make sure to download the image appropriate for your version of Android.
    2. Drag the .zip file onto the running emulator and drop it to install the component, here we show it on Mac OS X, but the same mechanism is used in Windows. You will get a prompt to install the package onto the emulator which indicates the image will be restarted
    3. Once it restarts, you will get a notification that installation is completed, and the image will now have Google Maps, Google+ and support for the Google Play store. Note that some things do not work correctly and you may get a few errors from some of the services, but you can safely dismiss these and continue the instructions.
    4. Next, you will need to associate a Google account so that you can update the services using the Google Play store. It should prompt you for this, but if it does not, you can go into the Google Settings and add a new account. Once you've added the account, you can then update the Google apps by opening the Google Play store application and going into settings from the side bar menu.
    5. Select Settings and then scroll down to the Build Version number information and double-tap on it until it tells you it is either up-to-date, or that it will download and install a new version.
    6. Power off the device (press and hold the power button in the toolbar on the right) and restart it. Once it restarts, it should indicate that it needs to update the Google Play services, tapping the notification will open the Google Play Store and install the latest version

    Now you can run applications that depend on Google Maps in the Xamarin Android Player.

    0 讨论(0)
  • 2020-11-22 15:55

    Check out Setting Up Google Play Services which says:

    To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK.

    If you haven't installed the Google Play services SDK yet, go get it now by following the guide to Adding SDK Packages.

    To test your app when using the Google Play services SDK, you must use either:

    • A compatible Android device that runs Android 2.3 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.
    0 讨论(0)
提交回复
热议问题