-
Notifications
You must be signed in to change notification settings - Fork 441
[Bug] Failing to copy libraries with Unity 2022 and maintemplate enabled #1272
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
Comments
Hi @epsmarkh, Thanks for letting us know about this. I've used the same versions of the Unity editor and the Firebase SDK, and I am facing this issue on my end. I'll be marking this as a bug for now. You may refer to this thread for updates. |
I'm having the same problem on Mac with Apple Silicon |
the same problem |
has anyone solved this problem? |
for us it's work only with disabled mainTemplate in Unity Player Settings |
Thanks |
❗ Finally I found the reason why it's happening. There is a Unity bug, it's already registered, thus it's not related to Firebase at all: https://issuetracker.unity3d.com/issues/folder-name-is-truncated-when-dot-is-used-in-the-name Be more concretically, you can find this code in FileUtils class that is part of AndroidResolver project: https://github.com/googlesamples/unity-jar-resolver/blob/master/source/VersionHandlerImpl/src/FileUtils.cs#L635 When recursion goes to dotted part of the path (8.10.1 in your case), CreateFolder method returns an error. To solve the problem you can do one of the following things:
|
Simple yet Annoying Bug. Found a simple solution : No need to disable anything. It simply cannot find/create the folder with the same version number in Generated Local Repo Directory if created through Unity Asset Browser.
Voila!! Android Dependencies have been resolved. |
it's simple, but it's not work if you frequencly updated plugins, we need worked, not 🔧"magical" solution |
Of course, its a temporary solution. Its for the devs to fix it permanently as it is present in many versions of the editor, and I prefer not to touch the mess that the devs created, so hence my solution which hardly takes some time even if we add a couple different versions. |
Hey, @chkuang-g has already created PR-543 and after some time it will be merged to the unity-jar-resolver repo. |
that's worked, thank you!! |
Thanks it solved it for me too |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
When maintemplate.gradle is enabled and any firebase package is imported, the dependency manager fails to copy the files to the correct location in GeneratedLocalRepo. Builds and Force Resolve both fail with the error:
Unable to copy Assets\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.srcaar to Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar. Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar will not be included in Gradle builds. Reason: Failed to copy Assets\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.srcaar to Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar due to System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\unity\Projects\testu22\Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar'.
When browsing the directory, it has been incorrectly created as
Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8
instead of
Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Yes, it also happens with an empty project with just maintemplate.gradle enabled and any firebase package imported
What's the issue repro rate? (eg 100%, 1/5 etc)
100%
What happened? How can we make the problem occur?
Create a project, switch to Android, enable maintemplate.gradle and import any firebase package. When attempting to build or use the EDM force resolve option, errors are shown and the build fails.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
N/A
The text was updated successfully, but these errors were encountered: