How to install Google Play app in Android Studio emulator?

前端 未结 5 2067
孤独总比滥情好
孤独总比滥情好 2020-12-13 06:16

I am completely new to using Android Studio and I am trying to install the Google Play app on the emulator. I have installed the Google Repository and Goo

5条回答
  •  一向
    一向 (楼主)
    2020-12-13 06:17

    After a long while of testing, everything seems to be outdated. I can't find necessary APK's like GoogleLoginService.apk, etc.

    I got it to work by installing two virtual devices.

    1. My Device (a Samsung Galaxy Tab A with custom skin and sizes)
    2. A device, which had the "Play Store Available" icon in your AVD-Manager on the site where you can create a new profile.

    I installed the first device and the second device with the same Android version, and used one profile from Samsung (because my tablet is a Samsung).

    After that step, I compared the config.ini file located in:

    C:\Users\USER\.android\avd\DEVICE_ID
    

    On Ubuntu/Linux it'll be in

    ~/.android/avd/DEVICE_ID
    

    Change the following variables to:

    PlayStore.enabled = true
    image.sysdir.1=system-images\android-27\google_apis_playstore\x86\
    tag.display=Google Play
    tag.id=google_apis_playstore
    

    Here's an example diff of what fields will be changed:

    After that you'll probably have to re-download the system image for the device, which you can do from Tools > AVD Manager.

    Here's an example screenshot of what that'd look like:

    Once done, restart the device, and Play store will be installed and ready to use.

提交回复
热议问题