如何使用不存在或过时的 Google Play 服务测试 android 应用程序?
How to test an android app with non-existing or outdated Google Play Services?
我正在构建一个 Android 应用程序,它通过 Google Play 服务使用地图。
在应用程序中,我正在检查 Google Plays Services 是否安装了以下功能:GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable
。如果 Google Play 服务不可用,我会显示一条消息:"Please install Google play services to continue."
如何在模拟器或设备上测试它?当 Google Play 服务不可用或版本不正确时,我如何模拟这种情况?在我的设备上安装了 Google Play 服务,因此我的应用程序始终运行良好。模拟器上也一样。我想检查我的应用程序在没有 Google Play 服务的设备上不会崩溃,但会显示一条指令。
您可能想要 "Uninstall Updates" Google Play 服务,方法是转至设置 > 应用 > Google Play 服务 > 卸载更新。
您还可以使用 Android studio 来模拟没有 Google Play 服务的设备:创建一个新的虚拟设备,并在选择系统映像时选择一个没有 Google API 的设备。
我正在构建一个 Android 应用程序,它通过 Google Play 服务使用地图。
在应用程序中,我正在检查 Google Plays Services 是否安装了以下功能:GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable
。如果 Google Play 服务不可用,我会显示一条消息:"Please install Google play services to continue."
如何在模拟器或设备上测试它?当 Google Play 服务不可用或版本不正确时,我如何模拟这种情况?在我的设备上安装了 Google Play 服务,因此我的应用程序始终运行良好。模拟器上也一样。我想检查我的应用程序在没有 Google Play 服务的设备上不会崩溃,但会显示一条指令。
您可能想要 "Uninstall Updates" Google Play 服务,方法是转至设置 > 应用 > Google Play 服务 > 卸载更新。
您还可以使用 Android studio 来模拟没有 Google Play 服务的设备:创建一个新的虚拟设备,并在选择系统映像时选择一个没有 Google API 的设备。