use*_*162 7 android xamarin visual-studio-2017
尝试使用Xamarin在VS2017中编译Android项目时,我遇到了错误.我得到一个字符串类型不允许错误,其中一个建议是更新我所有的Xamarin.Android引用.我发现了一个处理Xamarin.Core的observable的人,所以我安装了它.从那时起,我一直在解决分辨率错误.我已经尝试删除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
Run Code Online (Sandbox Code Playgroud)
我刚刚在另一个问题上回答了这个问题(/sf/answers/3134638461/)。
关键在于,如果您的解决方案保存到路径较长的位置,则可能会导致某些文件的路径超出 Windows 的最大路径(260 个字符)
尝试将解决方案移至 C 或 D 的根(如果有的话)。
| 归档时间: |
|
| 查看次数: |
4900 次 |
| 最近记录: |