Health Kit: Unable to complete Login and Authorization via Huawei ID

I use Huawei Health Kit in my Android app for data access in Huawei Health app. After launching the app on my Huawei HMS phone, I tap the “Login and Authorization” (see the screenshot below). It does not do anything. In other words, it seems that the app is unable to complete the process of login and authorization. Note that I do have a Huawei ID in the phone, and have Health Kit service approved for my app from link.

Can someone help?

enter image description here

1 answer

  • answered 2021-04-08 03:12 Zinna

    It seems that you have not imported the signing certificate to the app. There are several ways to resolve the issue. The simple way is to add the following code into the build.gradle file of the app:

    signingConfigs {
                  debug { 
    storeFile file('xxx.jks')
                                storePassword 'xxx '
                                keyAlias = 'xxx'
                                keyPassword 'xxx'
    

    Hope this helps. You can find additional info in Link