I successfully integrated the HMS Core SDK (HMS 18.104.22.1680 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.
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:
- Check whether HUAWEI AppGallery has been installed on the non-Huawei phone. If not, download and install HUAWEI AppGallery.
- Check whether metadata has been configured. If the HMS Base SDK version is 22.214.171.1240 or later, you need to configure the metadata shown in the following figure.
The metadata has already been configured, meaning it is not the problem.
- Finally, the technical support asked whether the provider section has been added to the manifest file.
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.