【问题标题】:Xamarin.iOS Archive fails after icon image changed图标图像更改后 Xamarin.iOS 存档失败
【发布时间】:2020-11-23 21:19:52
【问题描述】:

我使用的是 Windows VS2019,与配对的 Mac。当我使用默认图标图像存档我的 Xamarin.iOS 时,一切正常,但是当我替换资产目录中的图像(只有图像,文件名相同)时,得到了这个:

严重性代码描述项目文件行抑制状态 错误 System.IO.FileNotFoundException:找不到文件“/Users/Username/Library/Caches/Xamarin/mtbs/builds/Mealhint.Client.iOS/7dd3a1380dfc2b33cb9d05b42b9a01ca/obj/iPhone/Debug/actool/bundle/AppIcon60x60@2x.png " 文件名:'/Users/Username/Library/Caches/Xamarin/mtbs/builds/Mealhint.Client.iOS/7dd3a1380dfc2b33cb9d05b42b9a01ca/obj/iPhone/Debug/actool/bundle/AppIcon60x60@2x.png' 在 System.IO.FileStream..ctor(System.String 路径、System.IO.FileMode 模式、System.IO.FileAccess 访问、System.IO.FileShare 共享、System.Int32 bufferSize、System.Boolean 匿名、System.IO。 FileOptions 选项)[0x00259] 在 /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream。 cs:274 在 System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000 ] 在 /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:106 在 (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions) 在 System.IO.FileSystem.CopyFile (System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) [0x00025] 在 /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external /bockbuild/builds/mono-x64/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs:54 在 System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00056] 在 /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external /bockbuild/builds/mono-x64/external/corefx/src/System.IO.FileSystem/src/System/IO/File.cs:74 在 /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/msbuild/Xamarin 中的 Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile(System.String 源、System.String 目标、System.String targetItemSpec)[0x0002d] .MacDev.Tasks.Core/Tasks/SmartCopyTaskBase.cs:68 在 /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/SmartCopyTaskBase.cs:101 中的 Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () [0x000a4] Mealhint.Client.iOS C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 542

我尝试删除 bin 和 obj,删除 Mac 上的应用程序缓存并创建新的 appicon 资产,但我仍然收到此错误...应用程序可以在 iPhoneSimulator 上使用新图标图像正常工作。

【问题讨论】:

标签: c# .net xamarin xamarin.forms xamarin.ios


【解决方案1】:

这是由 24 位深度图像引起的。将位深度更改为 32 是解决方案

【讨论】:

  • 很高兴解决了它。您可以在可能的情况下标记答案,这将对遇到相同问题的其他人有所帮助。
  • @JuniorJiang-MSFT 我知道,但我必须再等 20 个小时才能接受它,
猜你喜欢
  • 1970-01-01
  • 2014-05-31
  • 1970-01-01
  • 2013-03-17
  • 2019-09-23
  • 1970-01-01
  • 1970-01-01
  • 2019-08-22
  • 1970-01-01
相关资源
最近更新 更多