-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMS Unity not working , create run time error (v2.3.5 - Unity 2019/2020/2021) #465
Comments
Thank you for reporting this issue/advice. |
Hello, you should try the plugin with a real device. Huawei recommended. Also, you can use any Android device with HMS Core installed. If you don't have an Android device you can use Cloud Debugging. |
yes, we tried the APK on Cloud Debugging, even it's not running in Unity, it created the error, we have already mentioned the error when it run in the Unity Editore. |
Can you provide the logs from CloudDebugging ? I need the check the logs |
I couldn't find any log related with unity or our plugin. Did you use any filter? It should be something like this one If you want you can sent me your APK and I can test. You can send here or email me [email protected] |
@alihan98ersoy, please review the email.
|
@breaksoftdev I asked for permission to download the APK. |
Ok, I found the problem you should use your agconnect-services.json File. Please refer to Obtaining the agconnect-services.json File Also, there are some errors "Error Unity InvalidOperationException: Insecure connection not allowed" I believe you missed the step on quick start. Adding Fingerprint Certificate to AppGallery Connect Can you follow the quick start? |
@alihan98ersoy i followed all the steps as you mentioned in the video, but when we enabled the test ads and ran on the cloud debugging, it's not show the ads. even it creates errors in the unity editor, and shoe script errors (signature not found) it's possible, can you share the project/repo with working ads.
|
The package of agconnect-services.json in your APK was com.refapp.cubesurfer.huawei. This is the same json that we loaded into the plugin as an example.
If you use our JSON you will connect your game to our project but you don't have the same fingerprint so it will give a 6003 fingerprint error. These are the APK: |
Thank you for using our repository! We're glad we could help solve your issue. If you found our repository helpful, please consider giving us a star ⭐ on GitHub: https://github.com/EvilMindDevs/hms-unity-plugin Your support helps us continue to improve our repository and provide valuable resources for others. |
We are trying to use the HMS Unity plugin for Huawei AppGallary. but it's not working, we tried all the methods and it's not shown in test mode, when we run the code it creates an error on the start screen.
please review the mentioned error
Exception: Field currentActivity or type signature not found
UnityEngine._AndroidJNIHelper.GetFieldID (System.IntPtr jclass, System.String fieldName, System.String signature, System.Boolean isStatic) (at :0)
UnityEngine.AndroidJNIHelper.GetFieldID (System.IntPtr javaClass, System.String fieldName, System.String signature, System.Boolean isStatic) (at :0)
UnityEngine._AndroidJNIHelper.GetFieldID[ReturnType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) (at :0)
UnityEngine.AndroidJNIHelper.GetFieldID[FieldType] (System.IntPtr jclass, System.String fieldName, System.Boolean isStatic) (at :0)
UnityEngine.AndroidJavaObject._GetStatic[FieldType] (System.String fieldName) (at :0)
UnityEngine.AndroidJavaObject.GetStatic[FieldType] (System.String fieldName) (at :0)
HuaweiMobileServices.Utils.AndroidContext.get_ActivityContext () (at <3e917abcbb924450a121c615facfe546>:0)
HuaweiMobileServices.Ads.HwAds.Init () (at <3e917abcbb924450a121c615facfe546>:0)
HmsPlugin.HMSAdsKitManager.Init () (at Assets/Huawei/Scripts/Ads/HMSAdsKitManager.cs:71)
HmsPlugin.HMSAdsKitManager.OnAwake () (at Assets/Huawei/Scripts/Ads/HMSAdsKitManager.cs:57)
HuaweiMobileServices.Utils.HMSDispatcher.InvokeAsync (System.Action action) (at <3e917abcbb924450a121c615facfe546>:0)
HmsPlugin.HMSAdsKitManager..ctor () (at Assets/Huawei/Scripts/Ads/HMSAdsKitManager.cs:50)
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean wrapExceptions, System.Boolean skipCheckThis, System.Boolean fillCache) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark& stackMark) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
System.Activator.CreateInstance[T] () (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
HMSManagerSingleton
1[T].get_Instance () (at Assets/Huawei/Scripts/Utils/HMSSingleton.cs:53) AdsDemoManager.ShowBannerAd () (at Assets/Huawei/Demos/Ads/AdsDemoManager.cs:83) AdsUIView.ButtonClick_ShowBannerAd () (at Assets/Huawei/Demos/Ads/AdsUIView.cs:67) UnityEngine.Events.InvokableCall.Invoke () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0) UnityEngine.Events.UnityEvent.Invoke () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0) UnityEngine.UI.Button.Press () (at Library/PackageCache/[email protected]/Runtime/UI/Core/Button.cs:70) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/[email protected]/Runtime/UI/Core/Button.cs:114) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/[email protected]/Runtime/EventSystem/ExecuteEvents.cs:57) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction
1[T1] functor) (at Library/PackageCache/[email protected]/Runtime/EventSystem/ExecuteEvents.cs:272)UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/[email protected]/Runtime/EventSystem/EventSystem.cs:514)
The text was updated successfully, but these errors were encountered: