Iai*_*ith 1 windows visual-studio xamarin.android xamarin
在为 Android 构建时,我不断遇到此错误:
严重性代码描述项目文件行抑制状态错误无法为类创建 JavaTypeInfo:Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/IAccessibilityStateChangeListenerImplementor 由于 System.IO.DirectoryNotFoundException:找不到路径的一部分“C:\Users” \Iain Smith\Documents\Developer\Work\Clients\Client1\Project1\Xamarin.Dev.Playground\Source\Client1.Playground.Android\obj\Debug\90\android\src\mono\android\support\v4\view\可访问性\AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.java'。在 System.IO.__Error.WinIOError(Int32 errorCode, String MaybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options,
是什么原因造成的?我如何解决它?在 CI 构建中似乎没有发生。
您可以使用以下几种方法来解决MAX_PATH长度问题:
在 Xamarin.Android .csproj 中:
<UseShortFileNames>True</UseShortFileNames> - 强制构建过程使用较短的路径名。
<IntermediateOutputPath>C:\Projects\MyApp</IntermediateOutputPath> - 指定一个公共的中间输出根来制作更短的路径。
更改组策略:
| 归档时间: |
|
| 查看次数: |
2459 次 |
| 最近记录: |