EvilMindDevs / hms-unity-plugin

The HMS Unity Plugin makes it easy to include Huawei Mobile Services into Unity-based games. Authentication, in-app purchases, push alerts, ads, and interaction with gaming services are just a few of the basic capabilities that this formidable tool makes available to your applications.
https://evilminddevs.gitbook.io/hms-unity-plugin/
309 stars 44 forks source link

AccountDemo scene is not working #71

Closed AAKLebanon closed 3 years ago

AAKLebanon commented 3 years ago

Hi, I am trying to integrate the Account kit into my unity app, I created the app on AppGallery connect, I created the manifest file, however, when I press login I see this error on the console, any idea what is left to do? :

NullReferenceException: Object reference not set to an instance of an object UnityEngine._AndroidJNIHelper.GetSignature (System.Object obj) (at :0) UnityEngine._AndroidJNIHelper.GetSignature (System.Object[] args) (at :0) UnityEngine._AndroidJNIHelper.GetConstructorID (System.IntPtr jclass, System.Object[] args) (at :0) UnityEngine.AndroidJNIHelper.GetConstructorID (System.IntPtr jclass, System.Object[] args) (at :0) UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) (at :0) UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) (at :0) HuaweiMobileServices.Utils.JavaObjectWrapper..ctor (System.String javaObjectCanonicalName, System.Object[] args) (at <1e37f842bdd74c6fb31adfba52b44a8f>:0) HuaweiMobileServices.Id.Scope..ctor (System.String uri) (at <1e37f842bdd74c6fb31adfba52b44a8f>:0) HuaweiMobileServices.Id.HuaweiIdAuthParams..cctor () (at <1e37f842bdd74c6fb31adfba52b44a8f>:0) Rethrow as TypeInitializationException: The type initializer for 'HuaweiMobileServices.Id.HuaweiIdAuthParams' threw an exception. HmsPlugin.AccountManager.Awake () (at Assets/Huawei/Scripts/Account/AccountManager.cs:36)

AAKLebanon commented 3 years ago

Ah sorry, I noticed that I should deploy to the device since this plug-in does not work in the editor, I also downgraded my unity from 2020 to 2019 ...