简体   繁体   English

iOS 构建错误:缺少文件 Icon102.png

[英]iOS Build Error: missing file Icon102.png

I have a Xamarin Forms App running on Android and iOS.我有一个在 Android 和 iOS 上运行的 Xamarin Forms 应用程序。 Everything works fine on a Simulator and on lokal devices.在模拟器和本地设备上一切正常。 When I push the Buid to AppCenter, the Android Version gets build without a problem, but the iOS Build alsways fails with the following error:当我将 Buid 推送到 AppCenter 时,Android 版本的构建没有问题,但 iOS 构建总是失败并出现以下错误:

(_CoreCompileImageAssets target) -> /Users/runner/runners/2.165.1/work/1/s/O365Info/O365Info.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png : error : File not found: /Users/runner/runners/2.165.1/work/1/s/O365Info/O365Info.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png [/Users/runner/runners/2.165.1/work/1/s/O365Info/O365Info.iOS/O365Info.iOS.csproj] (_CoreCompileImageAssets 目标)-> /Users/runner/runners/2.165.1/work/1/s/O365Info/O365Info.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png :错误:找不到文件:/Users/ runner/runners/2.165.1/work/1/s/O365Info/O365Info.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png [/Users/runner/runners/2.165.1/work/1/s/O365Info /O365Info.iOS/O365Info.iOS.csproj]

24 Warning(s)
1 Error(s)

Time Elapsed 00:01:01.73已用时间 00:01:01.73

[error]Xamarin.iOS task failed with error Error: /Library/Frameworks/Mono.framework/Versions/6_6_1/bin/msbuild failed with return code: 1. For guidance on setting up the build definition, see https://go.microsoft.com/fwlink/?LinkId=760847 . [错误] Xamarin.iOS 任务失败并出现错误错误:/Library/Frameworks/Mono.framework/Versions/6_6_1/bin/msbuild failed with return code: 1。有关设置构建定义的指南,请参阅https://go .microsoft.com/fwlink/?LinkId=760847

[section]Finishing: Build Xamarin.iOS solution. [部分]整理:构建 Xamarin.iOS 解决方案。

In the first builds I didn't even had a Iconset called AppIcon.appiconset (my Iconset was named appiconset1) and the whole project didn't include a file named "Icon1024.png".在第一个版本中,我什至没有一个名为 AppIcon.appiconset 的 Iconset(我的 Iconset 被命名为 appiconset1),并且整个项目不包含名为“Icon1024.png”的文件。 I then renamed my Iconset to appioconset and included a file named "Icon1024.png", but I'm still getting the same error.然后我将我的 Iconset 重命名为 appioconset 并包含一个名为“Icon1024.png”的文件,但我仍然遇到相同的错误。

No ideas, where this error might come from.没有想法,这个错误可能来自哪里。 Any suggestions?有什么建议?

Copied From ColeX at:从 ColeX 复制到:

https://forums.xamarin.com/discussion/179775/build-error-with-missing-file-icon1024-png https://forums.xamarin.com/discussion/179775/build-error-with-missing-file-icon1024-png

  1. Edit csproj file to remove the bogus entries (just delete them)编辑 csproj 文件以删除虚假条目(只需删除它们)
  2. Ensure that a 1024*21024 png icon (file does not have Alpha or transparent) add into Assets.xcassets确保将一个 1024*21024 的 png 图标(文件没有 Alpha 或透明)添加到 Assets.xcassets
  3. Ensure the 1024 file information included in csproj file确保csproj文件中包含1024文件信息

Refer参考

Where to find 'Missing Marketing Icon' 在哪里可以找到“缺少营销图标”

https://forums.xamarin.com/discussion/129252/problems-with-missing-appicons-files https://forums.xamarin.com/discussion/129252/problems-with-missing-appicons-files

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM