【发布时间】:2017-05-30 19:39:58
【问题描述】:
我在尝试使用 Xamarin 在 VS2017 中编译 Android 项目时遇到错误。我收到了不允许的字符串类型错误,其中一个建议是更新我的所有 Xamarin.Android 引用。我找到了一个处理 Xamarin.Core 的 observables,所以我安装了它。从那以后,我一直收到分辨率错误。我已尝试删除 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
【问题讨论】:
-
我在VS2017上也做过修复,没用
-
你可以在bugzilla中查看这个问题,问题是The specified path, file name, or both are too >long.,有几种方法可以解决你的问题,你可以查看一下。
-
我已经尝试了 Bugzilla 上提到的所有内容,但仍然收到错误消息。
标签: android xamarin visual-studio-2017