googlesamples / googlesamples/unity-jar-resolver

[Bug] Android ForceResolve can not copy files to GeneratedLocalRepo (bad folder name)

Open
#583 13 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
C#
Stars
1.5k
Forks
371
Avg merge
14h 21m
Merged PRs (30d)
3

Description

### [REQUIRED] Please fill in the following fields:

* Unity editor version: 2022.2.1f1
* External Dependency Manager version: 1.2.175
* Source you installed EDM4U: .unitypackage
* Features in External Dependency Manager in use: Android Resolver
* Plugins SDK in use: GooglePlayGames
* Platform you are using the Unity editor on: Windows

### [REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

1. Open Unity project
2. Switch to Android target
3. enable Custom Mapi Gradle Template
4. Set Up [Google Play Games plugin for Unity](https://github.com/playgameservices/play-games-plugin-for-unity) v0.11.01 from .unipypackage without jar-resolver
5. ForceResolve
6.

#### Please answer the following, if applicable:
What's the issue repro rate? (eg 100%, 1/5 etc)
100%

What happened? How can we make the problem occur?
```
Unable to copy Assets\GooglePlayGames\com.google.play.games\Editor\m2repository\com\google\games\gpgs-plugin-support\0.11.01\gpgs-plugin-support-0.11.01.srcaar to Assets\GeneratedLocalRepo\GooglePlayGames\com.google.play.games\Editor\m2repository\com\google\games\gpgs-plugin-support\0.11.01\gpgs-plugin-support-0.11.01.aar. Assets\GeneratedLocalRepo\GooglePlayGames\com.google.play.games\Editor\m2repository\com\google\games\gpgs-plugin-support\0.11.01\gpgs-plugin-support-0.11.01.aar will not be included in Gradle builds. Reason: Failed to copy Assets\GooglePlayGames\com.google.play.games\Editor\m2repository\com\google\games\gpgs-plugin-support\0.11.01\gpgs-plugin-support-0.11.01.srcaar to Assets\GeneratedLocalRepo\GooglePlayGames\com.google.play.games\Editor\m2repository\com\google\games\gpgs-plugin-support\0.11.01\gpgs-plugin-support-0.11.01.aar due to System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\repos\KkohnoLibs\My project (2)\Assets\GeneratedLocalRepo\GooglePlayGames\com.google.play.games\Editor\m2repository\com\google\games\gpgs-plugin-support\0.11.01\gpgs-plugin-support-0.11.01.aar'.
at System.IO.FileSystem.CopyFile (System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) [0x00060] in <8f06425e63004caf99a79845675f751e>:0
at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00062] in <8f06425e63004caf99a79845675f751e>:0
at System.IO.File.Copy (System.String sourceFileName, System.String destFileName) [0x00000] in <8f06425e63004caf99a79845675f751e>:0
at GooglePlayServices.PlayServicesResolver.CopyAssetAndLabel (System.String sourceLocation, System.String targetLocation, System.Boolean force) [0x000a3] in /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs:2481
UnityEngine.Debug:LogError (object)
Google.Logger:Log (string,Google.LogLevel) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:136)
GooglePlayServices.PlayServicesResolver:Log (string,Google.LogLevel) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs:1069)
GooglePlayServices.GradleTemplateResolver:CopySrcAars (System.Collections.Generic.ICollection`1) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleTemplateResolver.cs:167)
GooglePlayServices.GradleTemplateResolver:InjectDependencies (System.Collections.Generic.ICollection`1) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleTemplateResolver.cs:488)
GooglePlayServices.PlayServicesResolver/c__AnonStorey25:<>m__49 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs:1982)
Google.RunOnMainThread:ExecuteNext () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:486)
Google.RunOnMainThread:m__12 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:536)
Google.RunOnMainThread:RunAction (System.Action) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested (bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:ExecuteAll () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
```
![image](https://user-images.githubusercontent.com/17728172/208681601-8da6f9ee-9a09-49ca-9bc5-29d80e8ca65e.png)

It is can be fixed if created folder name("0" see screen) manually rename to 0.11.01.

[Mminimal project to reproduce](https://github.com/kkohno/PlayServicesBug)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.