首页 > 解决方案 > 升级后 Flutter 无法在 IOS 和 Android 上运行

问题描述

这是我得到的错误。我已经尝试了这些解决方案:

  1. https://fluttercorner.com/the-ios-simulator-deployment-targets-is-set-to-7-0-but-the-range-of-supported-d/
  2. 更改“inheritFromWidgetOfExactType”后,我开始收到 3 个不同的新错误

他们没有完全解决问题。

Running pod install...                                              6.0s
Running Xcode build...                                                  
Xcode build done.                                           57.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_prov
    ider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
              knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr);
                            ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1067:7:
    Error: The getter 'addressOf' isn't defined for the class 'LOGFONT'.
     - 'LOGFONT' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          addressOf.cast<Uint8>().elementAt(28).cast<Utf16>();
          ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1112:29:
    Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
     - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      LOGFONT get elfLogFont => addressOf.cast<LOGFONT>().ref;
                                ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1114:29:
    Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
     - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String get elfFullName => addressOf
                                ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1120:26:
    Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
     - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String get elfStyle => addressOf
                             ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1126:27:
    Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.
     - 'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String get elfScript => addressOf
                              ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2688:7:
    Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
     - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          addressOf.cast<Uint8>().elementAt(20).cast<Utf16>().unpackString(128);
          ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2699:11:
    Error: The getter 'addressOf' isn't defined for the class 'OSVERSIONINFO'.
     - 'OSVERSIONINFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            ..addressOf.cast<Uint8>().elementAt(20).value = 0;
              ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2744:24:
    Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_DEVICE_INFO'.
     - 'BLUETOOTH_DEVICE_INFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String get szName => addressOf
                           ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2837:7:
    Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
     - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value;
          ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2840:5:
    Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
     - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        addressOf.cast<Uint8>().elementAt(BTH_MAX_PIN_SIZE).value =
        ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2845:28:
    Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
     - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          String.fromCharCodes(addressOf.cast<Uint8>().asTypedList(pinLength));
                               ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2853:7:
    Error: The getter 'addressOf' isn't defined for the class 'BLUETOOTH_PIN_INFO'.
     - 'BLUETOOTH_PIN_INFO' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
          addressOf.cast<Uint8>().elementAt(idx).value = pinData[idx];
          ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:38:31:
    Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      final iid = GUID.allocate().addressOf;
                                  ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart:56:33:
    Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      final clsid = GUID.allocate().addressOf;
                                    ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/winrt/winrt_helpers.dart:
    86:40: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      final riidCalendar = GUID.allocate().addressOf;
                                           ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpap
    er.dart:197:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
     - 'COMObject' is from 'package:win32/src/com/combase.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final ptr = COMObject.allocate().addressOf;
                                         ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpap
    er.dart:200:49: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(CLSID_DesktopWallpaper).addressOf,
                                                    ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IDesktopWallpap
    er.dart:203:48: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(IID_IDesktopWallpaper).addressOf,
                                                   ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog
    .dart:58:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
     - 'COMObject' is from 'package:win32/src/com/combase.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final ptr = COMObject.allocate().addressOf;
                                         ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog
    .dart:61:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(CLSID_FileOpenDialog).addressOf,
                                                  ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileOpenDialog
    .dart:64:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(IID_IFileOpenDialog).addressOf,
                                                 ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog
    .dart:99:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
     - 'COMObject' is from 'package:win32/src/com/combase.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final ptr = COMObject.allocate().addressOf;
                                         ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog
    .dart:102:47: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(CLSID_FileSaveDialog).addressOf,
                                                  ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IFileSaveDialog
    .dart:105:46: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(IID_IFileSaveDialog).addressOf,
                                                 ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderMan
    ager.dart:164:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
     - 'COMObject' is from 'package:win32/src/com/combase.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final ptr = COMObject.allocate().addressOf;
                                         ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderMan
    ager.dart:167:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(CLSID_KnownFolderManager).addressOf,
                                                      ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IKnownFolderMan
    ager.dart:170:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(IID_IKnownFolderManager).addressOf,
                                                     ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListMan
    ager.dart:128:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
     - 'COMObject' is from 'package:win32/src/com/combase.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final ptr = COMObject.allocate().addressOf;
                                         ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListMan
    ager.dart:131:51: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(CLSID_NetworkListManager).addressOf,
                                                      ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/INetworkListMan
    ager.dart:134:50: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            GUID.fromString(IID_INetworkListManager).addressOf,
                                                     ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.da
    rt:82:38: Error: The getter 'addressOf' isn't defined for the class 'COMObject'.
     - 'COMObject' is from 'package:win32/src/com/combase.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/com/combase.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final ptr = COMObject.allocate().addressOf;
                                         ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.da
    rt:84:68: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
        final hr = CoCreateInstance(GUID.fromString(CLSID_WbemLocator).addressOf,
                                                                       ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/generated/IWbemLocator.da
    rt:85:64: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
     - 'GUID' is from 'package:win32/src/structs.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
            nullptr, CLSCTX_ALL, GUID.fromString(IID_IWbemLocator).addressOf, ptr);
                                                                   ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The
    getter 'addressOf' isn't defined for the class 'Utf8'.
     - 'Utf8' is from 'package:ffi/src/utf8.dart'
     ('../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
      String toString() => fromUtf8(addressOf);
                                    ^^^^^^^^^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error:
    Struct 'Utf16' is empty. Empty structs and unions are undefined behavior.
    class Utf16 extends Struct {
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct
    'Utf8' is empty. Empty structs and unions are undefined behavior.
    class Utf8 extends Struct {
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7:
    Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs and unions are undefined behavior.
    class NLM_SIMULATED_PROFILE_INFO extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7:
    Error: Struct 'STATSTG' is empty. Empty structs and unions are undefined behavior.
    class STATSTG extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7:
    Error: Struct 'CLSID' is empty. Empty structs and unions are undefined behavior.
    class CLSID extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7:
    Error: Struct 'SAFEARRAY' is empty. Empty structs and unions are undefined behavior.
    class SAFEARRAY extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7:
    Error: Struct 'PROPVARIANT' is empty. Empty structs and unions are undefined behavior.
    class PROPVARIANT extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7:
    Error: Struct 'PROPERTYKEY' is empty. Empty structs and unions are undefined behavior.
    class PROPERTYKEY extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7:
    Error: Struct 'EXCEPINFO' is empty. Empty structs and unions are undefined behavior.
    class EXCEPINFO extends Struct {}
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7:
    Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs and unions are undefined behavior.
    class BLUETOOTH_PIN_INFO extends Struct {
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7:
    Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs and unions are undefined behavior.
    class ENUMLOGFONTEX extends Struct {
          ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error:
    Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
      final int totalSize = count * sizeOf<T>();
                                    ^
    Failed to package /Users/fredricknjeri/Documents/Projects/xmobi/X-Mobi.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
    supported deployment target versions is 9.0 to 14.4.99. (in target 'FMDB' from project 'Pods')
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a
    placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from
    project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max. ```

标签: androidiosxcodeflutter

解决方案


该解决方案对我有用,其中包括更新软件包:

flutter pub upgrade

资源:

https://github.com/flutter/flutter/issues/83015


推荐阅读