如何在Android Studio模拟器中安装Google Play应用?

时间:2022-06-12 18:55:54

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 Google Play Services as well as a Google APIs x86 Atom System Image from the SDK manager and I am able to set up Google Play Services for my sample application.

我是使用Android Studio的新手,我正在尝试在模拟器上安装Google Play应用。我已经从SDK管理器安装了Google Repository和Google Play服务以及Google API x86 Atom System Image,我可以为我的示例应用程序设置Google Play服务。

I would now like to install the Google Play application on my emulator. How can this be done ? Any suggestions or a solution itself would be most appreciated. Also, thank you very much for your time.

我现在想在我的模拟器上安装Google Play应用程序。如何才能做到这一点 ?任何建议或解决方案本身都将非常受欢迎。另外,非常感谢你的时间。

5 个解决方案

#1


32  

Starting with Android Studio 3.0 Canary 1, you have now some options of devices that come with the Play Store app built-in(Nexus 5X and Nexus 5 on image below).

从Android Studio 3.0 Canary 1开始,您现在可以选择内置Play Store应用程序的设备(下图中为Nexus 5X和Nexus 5)。

如何在Android Studio模拟器中安装Google Play应用?

#2


1  

Download Google apps (GoogleLoginService.apk , GoogleServicesFramework.apk , Phonesky.apk) from http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2

从http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2下载Google应用(GoogleLoginService.apk,GoogleServicesFramework.apk,Phonesky.apk)

Start your emulator:

启动你的模拟器:

emulator -avd VM_NAME_HERE -partition-size 500 -no-audio -no-boot-anim

Then use the following commands:

然后使用以下命令:

Remount in rw mode

adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system

Allow writing to app directory on system partition

adb shell chmod 777 /system/app

Install following apk

adb push GoogleLoginService.apk /system/app/.
adb push GoogleServicesFramework.apk /system/app/.
adb push Phonesky.apk /system/app/. # Vending.apk in older versions
adb shell rm /system/app/SdkSetup*

Refer: to this SO Post

请参阅:此SO帖子

#3


1  

Start your emulator:

emulator -avd VM_NAME_HERE -partition-size 500 -no-audio -no-boot-anim
Then use the following commands:

# Remount in rw mode
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system

# Allow writing to app directory on system partition
adb shell chmod 777 /system/app

# Install following apk
adb push GoogleLoginService.apk /system/app/.
adb push GoogleServicesFramework.apk /system/app/.
adb push Phonesky.apk /system/app/. # Vending.apk in older versions
adb shell rm /system/app/SdkSetup*

#4


0  

All this is not necessary on the latest MM API images.

所有这些都不是最新的MM API图像所必需的。

All that was needed for me was to:

我需要的只是:

adb remount
adb push Phonesky.apk /system/priv-app/.
adb stop && adb restart

#5


0  

On new version of sdk, you could browse:

在新版本的sdk上,您可以浏览:

C:\Users{$User}\AppData\Local\Android\sdk\tools

C:\用户{$ USER} \应用程序数据\本地\ Android的\ SDK \工具

Create avd from command line:

从命令行创建avd:

android create avd --name bphone --package "system-images;android-23;google_apis;x86_64"

android create avd --name bphone --package“system-images; android-23; google_apis; x86_64”

There will be a question asking you to custom profile, say yes, then an asking to install CH Play or not, just type yes. Then, open AVD Manager inside Android Studio to reconfig. Notes: Remember to change CPU/ABI to x86

会有一个问题要求您自定义配置文件,说是,然后要求安装CH Play,只需键入yes即可。然后,在Android Studio中打开AVD Manager进行重新配置。注意:请记住将CPU / ABI更改为x86

#1


32  

Starting with Android Studio 3.0 Canary 1, you have now some options of devices that come with the Play Store app built-in(Nexus 5X and Nexus 5 on image below).

从Android Studio 3.0 Canary 1开始,您现在可以选择内置Play Store应用程序的设备(下图中为Nexus 5X和Nexus 5)。

如何在Android Studio模拟器中安装Google Play应用?

#2


1  

Download Google apps (GoogleLoginService.apk , GoogleServicesFramework.apk , Phonesky.apk) from http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2

从http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2下载Google应用(GoogleLoginService.apk,GoogleServicesFramework.apk,Phonesky.apk)

Start your emulator:

启动你的模拟器:

emulator -avd VM_NAME_HERE -partition-size 500 -no-audio -no-boot-anim

Then use the following commands:

然后使用以下命令:

Remount in rw mode

adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system

Allow writing to app directory on system partition

adb shell chmod 777 /system/app

Install following apk

adb push GoogleLoginService.apk /system/app/.
adb push GoogleServicesFramework.apk /system/app/.
adb push Phonesky.apk /system/app/. # Vending.apk in older versions
adb shell rm /system/app/SdkSetup*

Refer: to this SO Post

请参阅:此SO帖子

#3


1  

Start your emulator:

emulator -avd VM_NAME_HERE -partition-size 500 -no-audio -no-boot-anim
Then use the following commands:

# Remount in rw mode
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system

# Allow writing to app directory on system partition
adb shell chmod 777 /system/app

# Install following apk
adb push GoogleLoginService.apk /system/app/.
adb push GoogleServicesFramework.apk /system/app/.
adb push Phonesky.apk /system/app/. # Vending.apk in older versions
adb shell rm /system/app/SdkSetup*

#4


0  

All this is not necessary on the latest MM API images.

所有这些都不是最新的MM API图像所必需的。

All that was needed for me was to:

我需要的只是:

adb remount
adb push Phonesky.apk /system/priv-app/.
adb stop && adb restart

#5


0  

On new version of sdk, you could browse:

在新版本的sdk上,您可以浏览:

C:\Users{$User}\AppData\Local\Android\sdk\tools

C:\用户{$ USER} \应用程序数据\本地\ Android的\ SDK \工具

Create avd from command line:

从命令行创建avd:

android create avd --name bphone --package "system-images;android-23;google_apis;x86_64"

android create avd --name bphone --package“system-images; android-23; google_apis; x86_64”

There will be a question asking you to custom profile, say yes, then an asking to install CH Play or not, just type yes. Then, open AVD Manager inside Android Studio to reconfig. Notes: Remember to change CPU/ABI to x86

会有一个问题要求您自定义配置文件,说是,然后要求安装CH Play,只需键入yes即可。然后,在Android Studio中打开AVD Manager进行重新配置。注意:请记住将CPU / ABI更改为x86