我收到並嘗試在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