简体   繁体   English

发布版华为AppGallery 6003错误码

[英]Huawei AppGallery 6003 Error Code in release version

I removed the all gms related apis and added hms ones.我删除了所有与 gms 相关的 api 并添加了 hms 的。 My debug version is working awesome , I have the agconnect file in my project root.我的调试版本运行良好,我的项目根目录中有 agconnect 文件。 But If I download my app directly from appGallery, my hms core related apis are not working.但是如果我直接从 appGallery 下载我的应用程序,我的 hms 核心相关 api 将无法正常工作。 (like pushkit and iap). (如 pushkit 和 iap)。 I checked the console when my app's release version is running and I saw this error:当我的应用程序的发布版本正在运行时,我检查了控制台,我看到了这个错误:

 com.huawei.hms.common.ApiException: 6003: certificate fingerprint error

There are two SHA-256 fingerprint code:有两种 SHA-256 指纹代码:

在此处输入图像描述

How did I build the app?我是如何构建应用程序的?

It was pretty same with gms version.与 gms 版本几乎相同。 I selected the Build->Generate Signed Bundle or Apk menu and I builded with my existing keystore file which I also use for Google Play, then uploaded to AppGallery connect.我选择了 Build->Generate Signed Bundle or Apk 菜单,并使用我现有的密钥库文件进行构建,该文件也用于 Google Play,然后上传到 AppGallery connect。 There was no error or warning.没有错误或警告。

How can I fix it?我该如何解决?

Check whether the appid is the same as the appid on AppGalleryConnect.检查appid是否与AppGalleryConnect上的appid相同。 Check your configuration carefully.仔细检查您的配置。 In addition, check the certificate fingerprint.此外,检查证书指纹。 Ensure that the JSON file is stored in the project-level directory instead of the application-level directory, check the following items configuration process carefully.确保JSON文件存放在工程级目录而不是应用级目录下,仔细检查以下各项配置过程。

1.Check whether the fingerprint certificate is correctly configured when you apply for related services. 1.在申请相关服务时检查指纹证书是否配置正确。 Open the APK file of an 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 print the signature certificate information.打开应用的APK文件,解压META-INF目录,获取目录下的CERT.RSA文件,执行keytool -printcert -file META-INF/CERT.RSA命令打印签名证书信息.

2.HMS Core (APK) will cache the signature file. 2.HMS Core(APK)会缓存签名文件。 You need to find HMS Core (APK) on the Apps page of your device and clear its cache, restart your app, and perform the previous operation again.您需要在您设备的Apps页面找到HMS Core (APK)并清除缓存,重启您的应用程序,然后再次执行之前的操作。

3.Sign in to AppGallery Connect, click My apps . 3.登录AppGallery Connect,点击我的应用 On the page that is displayed, go to Develop > Project settings > conventional , check whether SHA-256 certificate fingerprint is consistent with the fingerprint in step 1.在出现的页面 go开发 > 项目设置 > 常规,检查SHA-256证书指纹是否与步骤1中的指纹一致。

4.For third-party access, check the value of appid. 4.第三方访问,查看appid的值。

<meta-data android:name="com.huawei.hms.client.appid" android:value="Your appid"/> 

or或者

<meta-data android:name="com.huawei.hms.client.appid" android:value="appid=Your appid"/>

Also you're advised to upgrade the SDK.此外,建议您升级 SDK。

Hope this could help with your issue.希望这可以帮助您解决问题。 :) :)

The 6003 error is caused by inconsistent certificate fingerprint configurations. 6003错误是由于证书指纹配置不一致导致的。 Check the following items:检查以下项目:

  1. Ensure that the certificate fingerprint has been configured, and the certificate for packing the signature on the local client is the same as the certificate for configuring the fingerprint in AppGallery Connect.确保已配置证书指纹,且本地客户端打包签名的证书与AppGallery Connect中配置指纹的证书相同。 Generating Signing Certificate 生成签名证书

  2. Check the fingerprint entries in the certificate.检查证书中的指纹条目。 It is recommended that you use a single entry.建议您使用单个条目。

  3. If the 6003 error persists when you run the local client after the fingerprint is configured, the debug certificate is running by default.如果配置指纹后运行本地客户端仍然出现6003错误,则默认运行调试证书。 You need to manually go to Settings > Apps > Apps > Search (HUAWEI Mobile Services) to clear the cache and data, close the app, and try again.您需要手动 go 到设置 > 应用程序 > 应用程序 > 搜索(华为移动服务)清除缓存和数据,关闭应用程序,然后重试。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM