我收到并尝试在Xamarin中编译VS2017中的Android项目时出错。我得到一个字符串类型不允许错误,其中一个建议是更新我所有的Xamarin.Android引用。我发现了一个处理Xamarin的可观察性问题。所以我安装了它。从那时起,我一直在分辨率错误。我试过删除obj和bin目录并重新启动vs和我的笔记本电脑。错误“ResolveLibraryProjectImports”任务意外失败
下面是错误
错误“ResolveLibraryProjectImports”任务意外失败的文本。 System.IO.PathTooLongException:指定的路径,文件名或这两者太长>。完全限定的文件名必须少于260个字符,>目录名称必须少于248个字符。 (字符串路径,布尔fullCheck,Int32> maxPathLength,布尔expandShortPaths) 在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,布尔useRights,FileShare共享,Int32 bufferSize,> FileOptions选项,SECURITY_ATTRIBUTES secAttrs,字符串msgPath,布尔> bFromProxy,布尔useLongPath,布尔checkHost) 在System.IO.FileStream..ctor(字符串路径,FileMode模式,FileAccess>访问, FileShare share) at System.IO.File.Open(String path,FileM在Xamarin.Tools.Zip.ZipEntry.Extract(String destinationDir,String> destinationFileName,FileMode outputFileMode)处输入: (位于Xamarin.Tools.Zip.ZipEntry.DoExtract 在Xamarin.Android.Tools.Files.ExtractAll(ZipArchive拉链,字符串>目的地,动作
2 progressCallback) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract (DirectoryAssemblyResolver res, ICollection
1个罐子,ICollection的1 >resolvedResourceDirectories, ICollection
1个resolvedAssetDirectories,> ICollection`1 resolvedEnvironments) 在Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() 在> Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutio> nHost.Execute() 在> Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()LayoutExample.Android
我也在VS2017上做了修复,没有用 – user182162
你可以在bugzilla中检查这个问题,问题是[指定的路径,文件名或者两者都太长>](https://bugzilla.xamarin .com/show_bug.cgi?id = 18495),有几种方法可以解决你的问题,你可以检查一下。 –
我已经尝试了Bugzilla上提到的所有内容,但仍然收到错误消息。 – user182162