Skip to content

NoSuchMethodError exception when calling setConsentStatus #19

@kiloophilipullersted

Description

@kiloophilipullersted

Hello

When calling the setConsentStatus, via the SetConsentStatus(bool personal) method(in HuaweiServiceSample/Assets/HuaweiServiceDemo/Scripts/test/ads/AdsTest.cs) on a P9 (Android 6) and a MediaPad M5 lite (Android 8), I get this exception.

04-12 12:47:20.292 11526 11564 E Unity : AndroidJavaException: java.lang.NoSuchMethodError: no non-static method "Lcom/huawei/hms/ads/consent/constant/ConsentStatus;.<init>()V" 04-12 12:47:20.292 11526 11564 E Unity : java.lang.NoSuchMethodError: no non-static method "Lcom/huawei/hms/ads/consent/constant/ConsentStatus;.<init>()V" 04-12 12:47:20.292 11526 11564 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method) 04-12 12:47:20.292 11526 11564 E Unity : at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) 04-12 12:47:20.292 11526 11564 E Unity : at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) 04-12 12:47:20.292 11526 11564 E Unity : at android.os.Handler.dispatchMessage(Handler.java:104) 04-12 12:47:20.292 11526 11564 E Unity : at android.os.Looper.loop(Looper.java:166) 04-12 12:47:20.292 11526 11564 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) 04-12 12:47:20.292 11526 11564 E Unity : at UnityEngine.AndroidJNISafe.CheckException () [0x00096] in <0c28e1e730cf4a17bc80dd76531d408b>:0 04-12 12:47:20.292 11526 11564 E Unity : at UnityEngine.AndroidJNISafe.GetMethodID (System.IntPtr obj, System.String name, System.String sig) [0x0000e] in <0c28e1e730cf4a17bc80dd76531d408b>:0 04-12 12:47:20.292 11526 11564 E Unity : at UnityEngine._AndroidJNIHelper.GetConstructorID (System.IntPtr jclass, System.String signature) [0x0001b] in <0c28e1e730cf4a17bc80dd76531d408b>:0

You should be able to reproduce it by downloading the project(HuaweiServiceSample) building it and pressing "set content personal" or "set consent not personal" button.

Any ideas of how to fix it or what the issue causing this could be?

Attached is a device log for when the exception happens on one of the devices mentioned. The exception is starting at line 9309
FullDeviceLogForConsentError.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions