Skip to content
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

Issue installing Huawei Android dependencies #493

Closed
BigGiantHead opened this issue May 13, 2024 · 12 comments
Closed

Issue installing Huawei Android dependencies #493

BigGiantHead opened this issue May 13, 2024 · 12 comments
Assignees
Labels
new solved Developer confirm that issue solved.

Comments

@BigGiantHead
Copy link

Unity editor version: 2022.3.28f1
External Dependency Manager version: 1.2.179
Source you installed EDM4U: .unitypackage (.unitypackage or Unity Package Manager)
Features in External Dependency Manager in use: Android Resolver (Android Resolver, iOS Resolver, VersionHandler, etc.)
Plugins SDK in use: Empty test project (Firebase, Admob, Facebook, etc.)
Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)

I created an xml file for the External Dependency Manager that should resolve the dependencies for Android for your Huawei package. Everything works fine except that, even in an empty project, I have to have Jetiffier turned on, and I am getting the following Gradle error:

* Where:
Build file '/Users/ivanivanovski/Projects/TroposAR/HuaweiTest/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle' line: 1025

* What went wrong:
Execution failed for task ':process_com.android.tools.build.bundletool-0.13.2.jar'.
> com.android.tools.build.jetifier.processor.transform.bytecode.AmbiguousStringJetifierException: The given artifact contains a string literal with a package reference 'android.support.design.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.

I am not really sure how to solve this since it also happens in a completely empty project.
Here are the settings that I have for External Dependency Manager:
Screenshot 2024-05-13 at 15 04 01

Thank you for your help.

Copy link

Thank you for reporting this issue/advice.

We will get back to you as soon as possible.
Would you like to star our plugin to support us? ✨

@Andronovo-bit
Copy link
Collaborator

Hi @BigGiantHead. There are steps you need to do before and after importing the plugin. If you do not perform these steps, you will get an error even if the project is empty.

Can you perform the steps by following the link below?

https://evilminddevs.gitbook.io/hms-unity-plugin/getting-started/quick-start

@BigGiantHead
Copy link
Author

I already registered our project and copied the agconnect file. I don't really want to use that last step because I want to initialise it through code.

@BigGiantHead
Copy link
Author

The problem arises when I make a build on Android. It either doesn't resolve the libraries and the app crashes, or I use External Dependency Manager and it simply doesn't work for the android dependencies.

@BigGiantHead
Copy link
Author

BigGiantHead commented May 13, 2024

@Andronovo-bit I made it work as per your instructions. When I make a build on my Huawei P30 Pro I am getting this error in the terminal:

05-13 16:51:03.405 15918 15956 E Unity : InvalidOperationException: Failed to load the HMSIAPKitSettings. Please restart Unity Editor
05-13 16:51:03.405 15918 15956 E Unity : at HmsPlugin.HMSIAPKitSettings..ctor () [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at System.Activator.CreateInstance[T] () [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at HmsPlugin.HMSEditorSingleton`1[T].get_Instance () [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at HmsPlugin.HMSIAPManager.InitControlOfIAP () [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at HuaweiMobileServices.Utils.HMSDispatcher.InvokeAsync (System.Action action) [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00000] in <00000000000000000000000000000000>:0
05-13 16:51:03.405 15918 15956 E Unity : at System.Activator.C

How do I go around this issue?

@BigGiantHead
Copy link
Author

@Andronovo-bit I turned off Initialize on Start and now I am getting

05-13 17:01:34.009 16969 17043 E Unity : [HMSException]: FAQ => The below 6003 error is caused by inconsistent certificate fingerprint configurations. Please check https://evilminddevs.gitbook.io/hms-unity-plugin_/support/faq#what-should-i-do-if-a-6003-error-occurs for more information.
05-13 17:01:34.009 16969 17043 E Unity : HmsPlugin.HMSIAPManager:b__69_1(HMSException)
05-13 17:01:34.009 16969 17043 E Unity : HuaweiMobileServices.Utils.HMSDispatcher:Update()

What does this mean exactly?
That anchor doesn't exist on the page.

@Andronovo-bit
Copy link
Collaborator

@BigGiantHead Did you activate the plugin and kit that you want to use?

image

Can you look this link for 6003 error ?

https://evilminddevs.gitbook.io/hms-unity-plugin/support/faq/build-and-development#what-should-i-do-if-a-6003-error-occurs

@BigGiantHead
Copy link
Author

image

yes I activated IAP. Let me check the link.

@Andronovo-bit
Copy link
Collaborator

@BigGiantHead
Copy link
Author

Looks like the problem was that I had to add my account as tester account on AppGallery.

@BigGiantHead
Copy link
Author

@Andronovo-bit managed to make this work. Thanks for your help. My setup was missing a few things on AppGallery.

Copy link

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.

@Andronovo-bit Andronovo-bit added the solved Developer confirm that issue solved. label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new solved Developer confirm that issue solved.
Projects
None yet
Development

No branches or pull requests

2 participants