EvilMindDevs / hms-sdk-unity

Unity C# wrapper SDK for Huawei Mobile Services kits.
MIT License
25 stars 23 forks source link

MissingMethodException: Constructor on type 'HuaweiMobileServices.Base.TaskAndroidJavaObject' not found. #59

Closed jordanrsas closed 3 years ago

jordanrsas commented 3 years ago

2020-10-31 03:38:28.354 23157-24611/? E/Unity: MissingMethodException: Constructor on type 'HuaweiMobileServices.Base.TaskAndroidJavaObject' not found. at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0 at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <00000000000000000000000000000000>:0 at HuaweiMobileServices.Utils.AndroidJavaObjectExtensions.AsWrapper[T] (UnityEngine.AndroidJavaObject javaObject) [0x00000] in <00000000000000000000000000000000>:0 at HuaweiMobileServices.Game.RankingsClientWrapper.ShowTotalRankings (System.Action onSuccess, System.Action`1[T] onFailure) [0x00000] in <000000

samifruit514 commented 3 years ago

I have the same exception. I got this when trying to display the leaderboards

m0skit0 commented 3 years ago

I assume you're using IL2CPP. This was already fixed several commits ago. Make sure you're using latest branch from repository and the correct version for your Unity version. Otherwise let me know in which version you're getting this error.