帮助构建适用于Android的Xamarin CrossPlatform项目 [英] HELP BUILDING A Xamarin CrossPlatform Project for Android
问题描述
我最近开始在Xamarin开发,所以我不知道如何解决这类错误,我很乐意接受任何帮助。谢谢
I recently started to develop in Xamarin, so I don't know how to fix this kind of errors, I'll be glad for receive any help. Thanks
这是错误:
严重性  代码    描述    项目   项目排名  文件    线   抑制状态
错误     "ResolveLibraryProjectImports""任务意外失败。
System.IO.PathTooLongException:指定的路径,文件名或两者都太长。完全限定的文件名必须少于260个字符,目录名必须少于248个字符。
在System.IO.PathHelper.GetFullPathName()
在System.IO.Path.LegacyNormalizePath(String path,Boolean fullCheck,Int32 maxPathLength,Boolean expandShortPaths)
在System.IO.Path.NormalizePath(String path,Boolean fullCheck,Int32 maxPathLength,Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
在Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip,String destination,Action`2 progressCallback,Func`2 modifyCallback,Func`2 deleteCallback,Boolean forceUpdate)
在Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res,ICollection`1 jars,ICollection`1 resolvedResourceDirectories,ICollection`1 resolvedAssetDirectories,ICollection`1 resolvedEnvironments)
在Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
在Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
在Microsoft.Build.BackEnd.TaskBuilder。< ExecuteInstantiatedTask> d__26.MoveNext() &NBSP; GuasaveDigitalApp.Android&NBSP;&NBSP; &NBSP; 1&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;
Severity Code Description Project Project Rank File Line Suppression State
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.GetFullPathInternal(String path)
at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action`2 progressCallback, Func`2 modifyCallback, Func`2 deleteCallback, Boolean forceUpdate)
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.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() GuasaveDigitalApp.Android 1
推荐答案
嗨朋友,
欢迎来到MSDN论坛。
我无法在我身边用Xamarin for android(.net framework,vs2017,win10 1803)重现这个问题。
例外似乎表明你的方向名称太长 。 如果方便,请将
解决方案移至C:root目录,使用VS IDE打开.sln并重建它以检查是否有帮助。
如果不起作用,请分享整个错误消息,以便我们可以直接为您检查。
此外:如果出现此问题从太长的名字和移动到C根目录解决它,你可以从这个
得到帮助
doc 。
上面的希望信息可以提供帮助。期待您的回复。
最好的问候。
这篇关于帮助构建适用于Android的Xamarin CrossPlatform项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!