gpt4 book ai didi

android - 错误 "ResolveLibraryProjectImports"任务意外失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:53:28 24 4
gpt4 key购买 nike

尝试使用 Xamarin 在 VS2017 中编译 Android 项目时出现错误。我收到了不允许的字符串类型错误,其中一项建议是更新我所有的 Xamarin.Android 引用。我找到了一个处理 Xamarin.Core 可观察对象的工具,所以我安装了它。从那以后,我一直收到分辨率错误。我尝试删除 obj 和 bin 目录并重新启动 vs 和我的笔记本电脑。

这是错误的文本

Error       The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.PathTooLongException: The specified path, file name, or both are too >long. The fully qualified file name must be less than 260 characters, and the >directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 > maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 >maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 >maxPathLength)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, >Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, >FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean >bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess >access, FileShare share)
at System.IO.File.Open(String path, FileMode mode)
at Xamarin.Tools.Zip.ZipEntry.DoExtract(IntPtr zipFile, String >destinationPath, FileMode outputFileMode, EntryExtractEventArgs args)
at Xamarin.Tools.Zip.ZipEntry.Extract(String destinationDir, String >destinationFileName, FileMode outputFileMode)
at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String >destination, Action`2 progressCallback)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract (DirectoryAssemblyResolver res, ICollection`1 jars, ICollection`1 >resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, >ICollection`1 resolvedEnvironments)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
at >Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutio>nHost.Execute()
at >Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() LayoutExample.Android

最佳答案

https://forums.xamarin.com/discussion/92979/error-the-resolvelibraryprojectimports-task-failed-unexpectedly

问题来了:System.IO.PathTooLongException:指定的路径、文件名或两者都太长。完全限定文件名必须少于 260 个字符,目录名必须少于 248 个字符。

尝试将您的项目移动到另一个位置,例如“C:/”,或者更改项目名称以获得更简短的名称

关于android - 错误 "ResolveLibraryProjectImports"任务意外失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44270606/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com