Huawei audit rejected: Check HMS Core update failed

Problem background

The game after the integration of Huawei’s HMS SDK was rejected by Huawei during the review. The reason given was: on a mobile phone that does not have or needs to update the Huawei Mobile Service version (HMS Core), the game prompts to install the Huawei Mobile Service (HMS Core). ), click Install, after the test, it prompts "Check for Huawei Mobile Service (HMS Core) update failed".

The suggestions for repairing this problem are as follows: You can first try to locate and repair the abnormality; during the positioning process, if the mobile service (HMS Core) cannot be uninstalled or there is no update prompt, please use a non-Huawei mobile phone for testing and check the cause according to the log.

Problem recurrence and log

I found a vivo phone, searched for Huawei Mobile Service or HMS Core in the application management, then uninstalled, and the application started to reproduce this scene. The problem is indeed reproduced:

Insert picture description here

Full log analysis error:

09-29 16:41:57.700 I/HMSSDK_HMSPackageManager( 8010): current versionCode:20502311, minimum version requirements: 40000000
09-29 16:41:57.702 I/updatesdk( 8010): UpdateSDK version is: 2.0.6.302 ,flavor: envrelease ,pkgName: com.XXX.huawei
09-29 16:41:57.714 E/StoreTask( 8010): UpdateSDK call store error: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
09-29 16:41:57.751 I/HMSSDK_UpdateWizard( 8010): CheckUpdateCallBack status is 6
09-29 16:41:57.752 E/HMSSDK_UpdateWizard( 8010): checkTargetAppUpdate reason is java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
09-29 16:41:57.752 E/HMSSDK_UpdateWizard( 8010): onUpdateStoreError responseCode: 6
09-29 16:41:57.765 I/HMSSDK_UpdateWizard( 8010): Enter onCheckUpdate, status: CHECK_FAILURE
09-29 16:41:57.768 I/HMSSDK_HMSPackageManager( 8010): current versionCode:20502311, minimum version requirements: 40000000

problem causes

Finally, communicate with Huawei's technical support, onUpdateStoreError responseCode: 6 This error code indicates that the query update information failed. The error is because we did not eliminate the following confusion:

-keep class com.huawei.updatesdk.*{ ; }

After completing the configuration in accordance with the official website obfuscating configuration instructions , the problem was resolved.

For more details, see

Official website obfuscation configuration:https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/config-obfuscation-scripts-0000001050166287


Original link:https://developer.huawei.com/consumer/cn/forum/topicview?tid=0202381614273280299&fid=18

Guess you like

Origin blog.51cto.com/14772288/2542656