简体   繁体   English

无法在新的华为设备上使用华为移动服务

[英]Can't use huawei mobile services on the new Huawei devices

I'm developing an android project.I want to integrate Huawei mobile services for Huawei devices without google play services.我正在开发一个 android 项目。我想为没有谷歌播放服务的华为设备集成华为移动服务。 in this project I have developed but when I test it for Huawei P40 in cloud debugging environment, Huawei mobile services don't work.It works when i test it on Huawei mate 10 pro.Huawei mobile services location kit not reacting at p40.在我开发的这个项目中,但是当我在云调试环境中为华为 P40 测试它时,华为移动服务不起作用。当我在华为 mate 10 pro 上测试它时它可以工作。华为移动服务定位套件在 p40 没有反应。 How can i solve this please help me我该如何解决这个问题请帮助我

Update:更新:

I got the following message in Logcat.我在 Logcat 中收到以下消息。 Message is;消息是; I/Last Location: Last location is null! I/最后一个位置:最后一个位置为空!

  1. Please check whether getLastLocation obtains location information from the system cache.请检查getLastLocation是否从系统缓存中获取位置信息。 If it does, the obtained location is null when the system cache has been cleared.如果是,则在清除系统缓存后,获得的位置为null In this case, call requestLocationUpdates to cache the current location.在这种情况下,调用requestLocationUpdates来缓存当前位置。 Then, you can obtain the location information by calling getLastLocation .然后,您可以通过调用getLastLocation获取位置信息。

Here is the HMS Core Location Kit demo on github here .这是github上的 HMS 核心定位套件演示。 Please update to the latest version:)请更新到最新版本:)


  1. Please ensure that the location permission has been assigned to the HMS Core app.请确保HMS Core应用已分配定位权限。 Go to Settings > Apps > Apps and find the HMS Core app. Go 到设置>应用程序>应用程序并找到 HMS Core 应用程序。 (The menu path may vary depending on the operating system version. If you cannot find the app, tap the menu icon in the upper right corner of Apps and tap Show system processes .) Then, tap the HMS Core icon, go to App info > Permissions > Location , and verify that the location permission is assigned to HMS Core. (菜单路径可能因操作系统版本而异。如果找不到应用程序,请点击应用程序右上角的菜单图标,然后点击显示系统进程。)然后,点击HMS Core图标,go到App info > Permissions > Location ,并验证 location 权限是否已分配给 HMS Core。
  2. You probably cannot use the high-precision location service as it is currently supported only on HUAWEI P40 series and is available only in the Chinese mainland.您可能无法使用高精度定位服务,因为它目前仅支持华为 P40 系列,并且仅在中国大陆可用。
  3. Activity identification and geofence are not supported on emulators.模拟器不支持活动识别和地理围栏。
  4. If the error persists, please provide us with logs of the fault.如果错误仍然存在,请向我们提供故障日志。

You can perform the following operations to capture the logs:您可以执行以下操作来捕获日志:

1). 1)。 Run the following command to connect to the device adb logcat –v time > D:\hwlocation.log运行以下命令连接设备adb logcat –v time > D:\hwlocation.log

2). 2)。 Reproduce the fault.重现故障。

3).Press Ctrl+C . 3).按 Ctrl+C

In addition, record the device model, EMUI version, HMS Core version, integrated SDK version, and fault reproduction procedure so that technical personnel can help you quickly troubleshoot the fault.另外,记录设备model,EMUI版本,HMS Core版本,集成SDK版本,故障重现流程,以便技术人员帮助您快速排除故障。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在华为 nova 7i 等新华为设备上使用谷歌播放服务许可证 - how use google play services license on new Huawei devices like Huawei nova 7i 实施华为移动服务 - Implementing Huawei Mobile Services 在没有 GSM 的新华为设备中禁用 Google Play 服务警告 - Disable Google Play Services warnings in new Huawei devices without GSM Android 华为地图agconnect-services.json找不到 - Android Huawei maps agconnect-services.json can't be located 检查华为移动服务 (HMS) 的可用性 - Check the Huawei Mobile Services (HMS) availability 华为移动服务的安卓虚拟设备 - Android Virtual Device for Huawei Mobile Services 在 AppGallery 上的新华为设备上看不到 Android apk - Android apk not visible on new Huawei devices on AppGallery 适用于 Google APIS(驱动器和表格)的新华为设备(无 Google Play 服务)中 Google 登录的替代方案 - Alternatives to Google Sign-in in new Huawei Devices(Without Google Play Services) for Google APIS(Drive and Sheets) 在 IDLE 模式下,Google Play 服务无法在华为设备上运行 - Google Play Services doesn't work on Huawei devices when in IDLE mode AutoCompleteTextView在华为设备中不起作用 - AutoCompleteTextView not working in Huawei devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM