华为登录失败,状态码为28

Huawei sign in failed with status code 28

尽管我使用了最后一个sdk,但华为登录失败,状态码为28。是什么原因导致此错误?

关于错误码6003,建议您检查appid是否与AppGalleryConnect上的appid一致

确保已配置证书指纹,本地客户端打包签名的证书与AppGallery Connect配置指纹的证书相同。并且JSON文件存放在工程级目录下,而不是应用级目录下,仔细检查以下项目配置过程。

1.Check申请相关服务时指纹证书是否配置正确。打开一个应用的APK文件,从文件中解压出META-INF目录,得到目录下的CERT.RSA文件,和运行 keytool -printcert -file META-INF/CERT.RSA 命令打印签名证书信息。

2.HMS Core(APK)会缓存签名文件。您需要在您设备的应用页面找到HMS Core(APK)并清空缓存,重启您的应用,重新执行之前的操作。

3.Sign进入AppGallery Connect,点击我的应用。在弹出的页面中,进入Develop > Project settings > conventional,检查SHA-256 certificate fingerprint是否与step中的指纹一致1.

错误6003表示此故障是签名证书指纹不正确造成的。

你可以:

  1. 确保应用的证书签名与AppGallery Connect中配置的一致

.Open the APK file of the app, extract the META-INF directory from the file, obtain the CERT.RSA file in the directory, and run the keytool -printcert -file META-INF/CERT.RSA command to display the signature certificate information.

.Check the SHA-256 certificate fingerprint configured in AppGallery Connect by referring to Configuring the Signing Certificate Fingerprint. If the information is the same as the preceding information displayed, the certificate fingerprint is correct.

2.Ensure说明manifest文件中的appid参数正确。

You can perform the check in either of the following ways: View the parameter directly in the manifest file under the project. Decompile the packaged APK file, and view the parameter. You can use any decompliation tool for that.

  1. 检查应用程序是否被加固或重新签名。
  2. 查看华为应用签名是否开启。根据官方文档,如果启用该服务,生成的证书指纹必须添加到AppGallery Connect中。