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

880 views Asked by At

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?

3

There are 3 answers

1
Wen xu Li On
3
Yasmine Abdelsamie On

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

0
Leonard Barbu On

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.