[Xamarin]

背景

新建的 Xamarin 项目,编译失败。

Error The "GenerateJavaStubs" task failed unexpectedly.
Error 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. Demo_Xamarin_HelloWorld.Android

原因

默认项目路径在C:UsersAdministratorDocumentsVisual Studio 2017Projects下,超出了Windows系统的长路径限制(MAX_PATH为260个字符)。

解决

更新项目为短路径即可。

参考资料

https://stackoverflow.com/a/37401496

原文地址:https://www.cnblogs.com/jinzesudawei/p/8242915.html