上周我能够在完全相同的Macbook pro上构建完全相同的项目,但现在我已经不在了,我也不明白为什么。
现在,当我第一次打开该项目时(我主要是在Windows计算机上使用该项目的android版本创建该项目的android版本)
解析软件包时发生错误:
One or more packages could not be added to the local file system:
com.unity.collab-proxy: EPERM: operation not permitted, unlink '/Users/dondoo/Desktop/Grove_Anniversary/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md'
com.unity.ext.nunit: EPERM: operation not permitted, unlink '/Users/dondoo/Desktop/Grove_Anniversary/Library/PackageCache/com.unity.ext.nunit@1.0.0/.gitlab-ci.yml'
com.unity.ide.rider: EPERM: operation not permitted, unlink '/Users/dondoo/Desktop/Grove_Anniversary/Library/PackageCache/com.unity.ide.rider@1.0.8/.editorconfig'
com.unity.ide.vscode: EPERM: operation not permitted, unlink '/Users/dondoo/Desktop/Grove_Anniversary/Library/PackageCache/com.unity.ide.vscode@1.0.7/CHANGELOG.md.meta'
com.unity.test-framework: EPERM: operation not permitted, unlink '/Users/dondoo/Desktop/Grove_Anniversary/Library/PackageCache/com.unity.test-framework@1.0.13/CHANGELOG.md'
com.unity.textmeshpro: EPERM: operation not permitted, unlink '/Users/dondoo/Desktop/Grove_Anniversary/Library/PackageCache/com.unity.textmeshpro@2.0.1/.gitlab-ci.yml'
此后崩溃,然后当我重新打开它时没有问题,但是当我尝试构建时出现此错误:
UnauthorizedAccessException: Access to the path "/Users/dondoo/Desktop/Grove_Anniversary/Temp/StagingArea/Data/Managed/Vuforia.UnityExtensions.dll" is denied.
System.IO.File.Delete (System.String path) (at <a8ed250850854b439cedc18931a314fe>:0)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.Collections.IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:412)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:246)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:326)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:813)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:635)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:582)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:45)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:49)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
我尝试重新导入所有内容。 我尝试过不同版本的统一。 我无法在Windows PC上构建,因为Firebase不允许从未使用MacOsX的计算机上进行ios构建。
答案 0 :(得分:0)
简短的回答是,如果Unity正在运行,则可以安全地删除Library目录。当在机器之间共享项目时,实际上将Library
,Temp
,obj
和Logs
添加到我的.gitignore
文件中。
我确实在您的日志中注意到/Users/dondoo
和/Users/builduser
。您还希望确保需要访问Unity项目的任何用户帐户都可以获取它(即:如果您以builduser
的身份运行Unity,但该文件夹只能由dondoo
访问,则玩得很不好)。由于您似乎在自动生成的Library
目录中存在问题,因此可能是这种情况。另外,如果您当前通过另一个Unity实例打开项目,则可能会遇到问题(例如:您以dondoo
的身份进行编辑,但随后builduser
试图进行自动构建)。
希望我的第一个答案可以解决此问题,但是如果没有,那么有几件事值得检查!
-帕特里克
答案 1 :(得分:0)
我通过删除项目随附的库和临时文件夹并允许统一重建它们来解决了这个问题。