googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.21k stars 337 forks source link

[Question] How to automate android dependency resolution using Unity -executeMethod? #621

Closed srichakradhar closed 1 year ago

srichakradhar commented 1 year ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the question here:

I tried running android resolver using /Applications/Unity/Hub/Editor/2022.2.9f1/Unity.app/Contents/MacOS/Unity -batchmode -quit -projectPath "${PWD}" -executeMethod Google.JarResolver.GooglePlayServices.PlayServicesResolver.MenuResolve I ended up with the error:

Aborting batchmode due to failure:
executeMethod class 'PlayServicesResolver' could not be found.
Argument was -executeMethod Google.JarResolver.GooglePlayServices.PlayServicesResolver.MenuResolve

I got the same error when I tried using just GooglePlayServices.PlayServicesResolver.MenuResolve also. Is it possible to run the android resolver from command line the way I did? Is there any other approach using which I can achieve this?

NVentimiglia commented 1 year ago

The execution method is incorrect.

/Applications/Unity/Hub/Editor/2022.2.9f1/Unity.app/Contents/MacOS/Unity -batchmode -quit -projectPath "${PWD}" -executeMethod GooglePlayServices.PlayServicesResolver.MenuResolve

chkuang-g commented 1 year ago

@NVentimiglia Thank you for the answer

@srichakradhar If you were using GooglePlayServices.PlayServicesResolver.MenuResolve and it still cannot find PlayServicesResolver, chances are that your Google.JarResolver.dll is not enabled.

If you import through .unitypackage, these EDM4U libraries were shipped disabled. They are enabled by default in .tgz. The reason is to prevent compiler error when two versions of libraries are enabled at the same time, which prevent VersionHandlerImpl.dll from properly disable the older version.

If this is your case, a couple of potential quick solution is available:

Let me know if this helps.

Shawn

google-oss-bot commented 1 year ago

Hey @srichakradhar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 year ago

Since there haven't been any recent updates here, I am going to close this issue.

@srichakradhar if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.