是啥导致“ConvertResourcesCases”意外失败?

Posted

技术标签:

【中文标题】是啥导致“ConvertResourcesCases”意外失败?【英文标题】:What causes the "ConvertResourcesCases" failed unexpectedly?是什么导致“ConvertResourcesCases”意外失败? 【发布时间】:2015-11-09 18:48:02 【问题描述】:

有没有人也遇到过这种问题?它发生在我将 Xamarin 升级到当前版本时。已经在 xamarin 论坛查看,仍然是零答案。 谢谢。

C:\程序文件 (x86)\MSBuild\Xamarin\android\Xamarin.Android.Common.targets(2,2): 错误 MSB4018:“ConvertResourcesCases”任务意外失败。 System.UnauthorizedAccessException:访问路径 'obj\Debug\res\values\strings.xml' 被拒绝。在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.File.InternalCopy(字符串源文件名,字符串 destFileName,布尔覆盖,布尔检查主机)在 System.IO.File.Copy(字符串源文件名,字符串目标文件名, 布尔覆盖)在 Xamarin.Android.Tools.Files.CopyIfChanged(字符串源,字符串 目的地)在 Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(ITaskItem 项目,字典2 acwMap) at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(Dictionary2 acwMap) 在 Xamarin.Android.Tasks.ConvertResourcesCases.Execute() 在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 在 Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() (MSB4018) (Gcm.Client)

【问题讨论】:

您是否尝试手动删除 `obj\Debug\' 文件夹? 是的。仍然有同样的问题。 将项目移动到另一个文件夹时会发生什么? 【参考方案1】:

删除项目内obj文件夹的内容。 清理构建。 重建项目。

现在,一切都应该正常了。我曾经遇到过这个问题。这是由于您在构建项目时创建的文件中的冲突

【讨论】:

不在这里!第一次没有编译。 这些天我在编译时经常遇到这个错误。它变得非常烦人。有什么地方我可以报告它以便有人解决这个问题?

以上是关于是啥导致“ConvertResourcesCases”意外失败?的主要内容,如果未能解决你的问题,请参考以下文章

是啥导致了这个推进错误?

是啥导致了 NSInvalidArgumentException?

是啥导致移动构造函数被删除

是啥导致系统发出蜂鸣声?

是啥导致 opensuse Docker 膨胀?

是啥导致连接中止?