3

I'm implementing push notification in Huawei devices and I've got this exception while trying to get token. And this this because of this line:

    Client = HmsInstanceId.GetInstance(Application.Context);

Exception:

{Java.Lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/framework/common/EmuiUtil; ---> Java.Lang.ClassNotFoundException: Didn't find class "com.huawei.hms.framework.common.EmuiUtil" on path: DexPathList[[zip file....

The exception message :

failed resolution of: Lcom/huawei/hms/framework/common/EmuiUtil

How can I solve it?

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • hi@Yasmine Abdelsamie, Could you kindly help us with some information to locate this issue? 1. what SDK version are you integrated with? 2. Have you configured obfuscation scripts? And also it would be nice if you could provide your test apk for us to test, you can send it to hmscore@huawei.com. – zhangxaochen Dec 30 '21 at 10:04

3 Answers3

1

The problem was solved by downgrading Huawei.Hms.Push package

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 08 '22 at 15:54
  • hi@Yasmine Abdelsamie, may i confirm which version did you report the error and which version did you downgrading to to solve the problem? – zhangxaochen Jan 26 '22 at 01:40
  • It was the latest version: 6.1.0.300 and I downgraded it to 5.0.4.302 – Yasmine Abdelsamie Jan 28 '22 at 14:13
1

According to this solution on GitHub, installing the NuGet package Huawei.Hms.NetworkFrameworkCompat will fix the issue. The install should be done for the Android Project.

0

Please check whether the HMS Core SDK is integrated.

For more information, please refer to: https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/identifier-service-integrating-sdk-0000001056460552-V5?ha_source=hms1.

Wen xu Li
  • 1,698
  • 1
  • 4
  • 7