提问者:小点点

Flutter应用程序不能在iOS15.0模拟器上构建,但在iOS13.0上iPhone


我的设置是:

M1苹果,Xcode 13,Flutter 2.5.3,Android Studio北极狐狸,iPhoneiOS13。

当我用Xcode构建iOS15模拟器时,错误是找不到模块'audioPlayer'。

当我使用android studio构建iOS15模拟器时,我得到了以下错误消息:


Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           204.8s
Failed to build iOS app
Error output from Xcode build:
↳
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
    { platform:iOS Simulator, id:29E31775-0A12-40E8-971E-6C04122A8278, OS:15.0, name:iPad (9th generation) }
    { platform:iOS Simulator, id:61A480B9-6DBC-40F4-8C45-957391EC3F61, OS:15.0, name:iPad Air (4th generation) }
    { platform:iOS Simulator, id:28890172-EBAC-4505-8B02-C692AA988855, OS:15.0, name:iPad Pro (9.7-inch) }
    { platform:iOS Simulator, id:25AF1CC3-F8DA-4E59-BBE2-64781D9A607B, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
    { platform:iOS Simulator, id:DC7ADFDE-098E-4402-9C19-DAF3DACD1360, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
    { platform:iOS Simulator, id:9F325846-1F78-4E6D-8C89-1595DEC10AC5, OS:15.0, name:iPad mini (6th generation) }
    { platform:iOS Simulator, id:8D5F42FD-B719-43CD-A7C4-87EDAF7A0BAD, OS:15.0, name:iPhone 8 }
    { platform:iOS Simulator, id:BF205C87-0C1B-4E42-A033-6A5D75FB63FB, OS:15.0, name:iPhone 8 Plus }
    { platform:iOS Simulator, id:91241BE7-4070-4E13-A34A-991062FE90B2, OS:15.0, name:iPhone 11 }
    { platform:iOS Simulator, id:ED94BDED-A5E3-4D94-B2CB-84D486592E53, OS:15.0, name:iPhone 11 Pro }
    { platform:iOS Simulator, id:EDD91E09-33CF-4F55-9D56-F1F7FCABE3AF, OS:15.0, name:iPhone 11 Pro Max }
    { platform:iOS Simulator, id:1B8A3EA0-BCE2-4803-B493-CA2176995827, OS:15.0, name:iPhone 12 }
    { platform:iOS Simulator, id:380C9387-703D-47AB-A787-804BA07FAC05, OS:15.0, name:iPhone 12 Pro }
    { platform:iOS Simulator, id:6541C680-6335-47B4-B6A0-4AF2CB6E8AB6, OS:15.0, name:iPhone 12 Pro Max }
    { platform:iOS Simulator, id:2E16CADF-A050-4865-8976-2EFF54FA3B6F, OS:15.0, name:iPhone 12 mini }
    { platform:iOS Simulator, id:456EE212-C377-4502-BD0D-62E2D98E5F21, OS:15.0, name:iPhone 13 }
    { platform:iOS Simulator, id:F65F2B05-DB6E-4687-BC9F-9CA7937D63A2, OS:15.0, name:iPhone 13 Pro }
    { platform:iOS Simulator, id:10B47E8C-04E0-47EB-BBEB-AFE3BC630A8B, OS:15.0, name:iPhone 13 Pro Max }
    { platform:iOS Simulator, id:2A850F25-C575-45B1-892C-2CA90EECC058, OS:15.0, name:iPhone 13 mini }
    { platform:iOS Simulator, id:67A7404D-CEE5-4797-8B83-6768F05A2F5F, OS:15.0, name:iPhone SE (2nd generation) }
    { platform:iOS Simulator, id:A0F72F10-8EDF-419D-A2E2-47C87AC36525, OS:15.0, name:iPod touch (7th generation) }
    { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-001175160C31001E }
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
    ** BUILD FAILED **


Xcode's output:
↳
    
    error: the following command failed with exit code 0 but produced no further output
    CompileC /Users/haocair/Library/Developer/Xcode/DerivedData/Runner-bqewhymcvvctgmczqyjvyqkvxlfa/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/gRPC-Core.build/Objects-normal/i386/xds_channel_secure.o /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'gRPC-Core' from project 'Pods')
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34:
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/writing.cc:21:
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/context_list.h:26:
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:109:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_chttp2_ping_queue
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:110:52: note: type is not C-compatible due to this default member initializer
      grpc_closure_list lists[GRPC_CHTTP2_PCL_COUNT] = {};
                                                       ^~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:112:3: note: type is given name 'grpc_chttp2_ping_queue' for linkage purposes by this typedef declaration
    } grpc_chttp2_ping_queue;
      ^
    1 warning generated.
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/tls/tls_security_connector.cc:21:
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/tls/tls_security_connector.h:25:
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/context/security_context.h:28:
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/tls/tls_security_connector.cc:32:
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/ssl/ssl_credentials.h:25:
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/ssl/ssl_security_connector.h:60:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_ssl_server_config
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/ssl/ssl_security_connector.h:61:51: note: type is not C-compatible due to this default member initializer
      tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs = nullptr;
                                                      ^~~~~~~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/ssl/ssl_security_connector.h:66:3: note: type is given name 'grpc_ssl_server_config' for linkage purposes by this typedef declaration
    } grpc_ssl_server_config;
      ^
    2 warnings generated.
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/tls/tls_credentials.cc:21:
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/tls/tls_credentials.h:26:
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/stream_lists.cc:22:
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:109:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_chttp2_ping_queue
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:110:52: note: type is not C-compatible due to this default member initializer
      grpc_closure_list lists[GRPC_CHTTP2_PCL_COUNT] = {};
                                                       ^~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:112:3: note: type is given name 'grpc_chttp2_ping_queue' for linkage purposes by this typedef declaration
    } grpc_chttp2_ping_queue;
      ^
    1 warning generated.....

......................
     /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRLoadBundleTask.mm:39:29: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'NSInteger' (aka 'int') [-Wshorten-64-to-32]
        _bytesLoaded = progress.bytes_loaded();
                     ~ ~~~~~~~~~^~~~~~~~~~~~~~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRLoadBundleTask.mm:41:28: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'NSInteger' (aka 'int') [-Wshorten-64-to-32]
        _totalBytes = progress.total_bytes();
                    ~ ~~~~~~~~~^~~~~~~~~~~~~
    /Users/haocair/Documents/FlutterPorjects/zwcanada/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRLoadBundleTask.mm:95:17: warning: implicit conversion loses integer precision: 'firebase::firestore::api::LoadBundleTask::LoadBundleHandle' (aka 'long long') to 'FIRLoadBundleObserverHandle' (aka 'int') [-Wshorten-64-to-32]
      return _task->Observe(std::move(core_observer));
      ~~~~~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 warnings generated.

    Failed to package /Users/haocair/Documents/FlutterPorjects/zwcanada.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel

Could not build the application for the simulator.
Error launching application on iPhone 13.

有人知道怎么解决吗?谢谢。


共1个答案

匿名用户