有什么有效的方法可以使用 Android Studio 模拟器测试华为商店的应用程序吗? [英] Is there any effective way to test an app for the Huawei Store using Android Studio emulator?

查看:141
本文介绍了有什么有效的方法可以使用 Android Studio 模拟器测试华为商店的应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何有效的方法可以使用 Android Studio 模拟器测试华为商店的应用程序.

I would like to know if there is any effective way to test an app for Huawei Store using an Android Studio emulator.

我尝试禁用 Google Play 服务,但由于某种原因改造请求停止工作:/

I tried disabling the Google Play Services, but for some reason Retrofit requests stopped working :/

推荐答案

大多数情况下,您只需抓取 HMS Core APK 并将其安装在模拟器或物理设备上

For most cases, you can simply grab HMS Core APK and install it on emulator or physical device

大多数情况下您不需要华为设备.这是我久经考验的解决方案.

You do not need for most cases Huawei device. Here is my battle-tested solution.

如果您要实现推送通知等 HMS(华为移动服务)功能,sms 检索 或 auth(orization) 你可以简单地做:

If you're implementing HMS (Huawei Mobile Services) feature like push notifications, sms retrieving or auth(orization) you can do simply:

  1. 从以下位置获取 HMS 核心 APK:https://www.huaweicentral.com/download-the-latest-huawei-mobile-services-apk/
  2. 通过 Android Studio 或 ADB 创建新的或运行现有的 Android 模拟器
  3. 安装从 1 下载的 HMS Core APK.
  4. 转到设置 ->应用程序通知
  5. 确保 HMS Core 具有 SMS 检索或推送通知等所需的权限
  6. 如果忘记了 5.,HMS 库将返回异常权限未启用"

我很确定您可以使用任何物理设备代替模拟器,而是获取 APK 并在其上安装 HMS Core.

I am pretty sure that instead of emulator you can use any of physical devices, grab APK and install HMS Core on it.

来自:https://stackoverflow.com/a/63790263/4730812

快乐编码!

这篇关于有什么有效的方法可以使用 Android Studio 模拟器测试华为商店的应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆