Flutter App IOS Release Build 错误:缺少所需的图标文件
Posted
技术标签:
【中文标题】Flutter App IOS Release Build 错误:缺少所需的图标文件【英文标题】:Flutter App IOS Release Build Error: Missing Required Icon File 【发布时间】:2019-02-28 10:47:11 【问题描述】:我构建了 ios 发布版本并在 Xcode 上创建了产品存档。但是当我尝试验证存档时,我收到了这个错误:
颤振医生 -v 输出:
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-US)
• Flutter version 0.8.2 at /Users/westworld/development/flutter
• Framework revision 5ab9e70727 (2 weeks ago), 2018-09-07 12:33:05 -0700
• Engine revision 58a1894a1c
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2
[✓] android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/westworld/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] VS Code (version 1.27.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.18.0
[!] Connected devices
! No devices available
! Doctor found issues in 1 category.
Xcode 部署目标是 10.0。
另外,Assets.xcassets 文件夹存在于 ios/Runner 文件夹中:
但我在 Xcode 文件夹结构中没有看到:
所以,对于 App Icons Source,我无法选择 AppIcon 文件夹:
不知道我问的是否清楚,但有人遇到过同样的问题吗?
【问题讨论】:
【参考方案1】:我认为您的文件系统不知何故不同步。如果您在 Android Studio 中右键单击 Assets.xcassets,然后在 Finder 中单击 Reveal,会显示什么?它实际上存在于您的项目文件夹中吗?如果是,那么您可能只需将其拖到 Xcode 中,然后删除当前的 AppIcon 文件。
在您执行上述任何操作之前,您还可以尝试运行 flutter clean
和 File->Sync with File System in Android Studio.
【讨论】:
以上是关于Flutter App IOS Release Build 错误:缺少所需的图标文件的主要内容,如果未能解决你的问题,请参考以下文章
Flutter:build/app/outputs下的apk/release目录和flutter-apk目录有啥区别?
flutter app release apk 打不开摄像头
关于flutter mac catalina arch: posix_spawnp: ...flutter/bin/cache/artifacts/engine/ios-release/gen_s