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.IAP.EnvReadyResult' not found. #47

Closed m0skit0 closed 4 years ago

m0skit0 commented 4 years ago
06-17 10:17:51.963 27735 27735 I HMSSDK_IsEnvReadyTaskApiCall: onResult, success
06-17 10:17:52.011 27735 27735 E Unity   : MissingMethodException: Constructor on type 'HuaweiMobileServices.IAP.EnvReadyResult' not found.
06-17 10:17:52.011 27735 27735 E Unity   :   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 
06-17 10:17:52.011 27735 27735 E Unity   :   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 
06-17 10:17:52.011 27735 27735 E Unity   :   at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0 
06-17 10:17:52.011 27735 27735 E Unity   :   at HuaweiMobileServices.Utils.AndroidJavaObjectExtensions.AsWrapper[T] (UnityEngine.AndroidJavaObject javaObject) [0x00000] in <00000000000000000000000000000000>:0 

And

MissingMethodException: Constructor on type 'HuaweiMobileServices.IAP.ProductInfoResult' not found

Reported here: https://github.com/EvilMindDevs/hms-unity-plugin/issues/29

m0skit0 commented 4 years ago

EnvReadyResult has correct constructor as expected by AsWrapper()

public EnvReadyResult(AndroidJavaObject javaObject) : base(javaObject) { }

ProductInfoResult has correct constructor as expected by AsWrapper()

public ProductInfoResult(AndroidJavaObject javaObject) : base(javaObject) { }