Flutter App IOS Release Build Error: Missing Required Icon File

Flutter App IOS Release Build Error: Missing Required Icon File

我构建了 IOS 发布版本并在 Xcode 上创建了产品存档。但是当我尝试验证存档时出现此错误:

flutter doctor -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 文件夹:

不知道我问清楚没有,有没有人遇到过同样的问题?

我认为您的文件系统不知何故不同步。如果您在 Android Studio 中右键单击 Assets.xcassets,然后单击“在 Finder 中显示”,会显示什么?它确实存在于您的项目文件夹中吗?如果是,那么您可能只需要将其拖入 Xcode,然后删除当前的 AppIcon 文件。

在执行任何操作之前,您还可以尝试 运行 flutter cleanFile->Sync with File System in Android Studio.