【问题标题】:Xamarin.iOS build error System.IO.FileNotFoundExceptionXamarin.iOS 生成错误 System.IO.FileNotFoundException
【发布时间】:2016-12-23 00:34:15
【问题描述】:

我在尝试使用分发配置文件进行构建时收到此错误

Error       System.IO.FileNotFoundException: /Users/xxx/Library/Caches/Xamarin/mtbs/builds/iOSClient/f4287e1ce437e3e2197bfddb3a942d82/obj/iPhone/Ad-Hoc/optimized/Default-736h@3x.png does not exist
File name: '/Users/xxx/Library/Caches/Xamarin/mtbs/builds/iOSClient/f4287e1ce437e3e2197bfddb3a942d82/obj/iPhone/Ad-Hoc/optimized/Default-736h@3x.png'
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x001bd] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:112 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile (System.String source, System.String target, System.String targetItemSpec) [0x0002d] in <4ed71c0d8bd847c3bc4130be1482dce1>:0 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () [0x00116] in <4ed71c0d8bd847c3bc4130be1482dce1>:0    iOSClient           

任何想法可能是什么原因?

【问题讨论】:

  • 错误提示您缺少图像:Default-736h@3x.png does not exist。你能仔细检查一下你的项目有一套吗?您可以查看此论坛帖子以获取更多信息:forums.xamarin.com/discussion/24788/…
  • 它使用调试配置文件构建得很好,只发生在发行版上,所以图像必须没问题吧?
  • 这可能是一个坏缓存。在您的 Mac 上,删除 /Users/xxx/Library/Caches/Xamarin/mtbs/builds/iOSClient/f4287e1ce437e3e2197bfddb3a942d82 缓存并重建您的项目,看看是否能解决问题。
  • 我删除了 /Users/xxx/Library/Caches/Xamarin/ 下的所有内容并清理/重建,没有运气!
  • 仔细检查您是否可以在图像工具中打开该图像以确保它没有损坏/等。确保它与其他不会导致问题的图像没有什么不同。按照确切的路径/Users/xxx/Library/Caches/Xamarin/mtbs/builds/iOSClient/f4287e1ce437e3e2197bfddb3a942d82/obj/iPhone/Ad-Hoc/optimized/Default-736h@3x.png 确保它在那里。

标签: xamarin xamarin.ios xamarin.forms


【解决方案1】:

这种情况下的解决方案是删除 C:\Users[当前用户]\AppData\Local\Xamarin 下的所有内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多