DEV Community

Cover image for What Can I Do If a Parsing Error Occurs When I Update HMS Core (APK) on Non-Huawei Phones
Zachary Powell
Zachary Powell

Posted on

What Can I Do If a Parsing Error Occurs When I Update HMS Core (APK) on Non-Huawei Phones

Problem

I successfully integrated the HMS Core SDK (HMS 5.1.0.300 on Android Studio) during a test on Huawei mobile phones. However, when I loaded a game on a Xiaomi phone, it prompted me to update HMS Core, and when I tried to update it a parsing error occurred.

Analysis & Solution

We contacted Huawei technical support in the game’s QQ group (if you have not joined the group, you can also submit a ticket to Huawei’s technical support team) and they advised us to:

  1. Check whether HUAWEI AppGallery has been installed on the non-Huawei phone. If not, download and install HUAWEI AppGallery.
  2. Check whether metadata has been configured. If the HMS Base SDK version is 5.0.4.300 or later, you need to configure the metadata shown in the following figure. image image

The metadata has already been configured, meaning it is not the problem.

  1. Finally, the technical support asked whether the provider section has been added to the manifest file. image

If not, an error indicating package parsing failure will be reported when HMS Core (APK) is installed on some models.
Note: The value of applicationId must be the app’s ID.

After following these steps, the Xiaomi phone test works as expected.

These solutions will also work for other non-Huawei phones.

Discussion (0)