Flutter - iOS 在 Android Studio 中构建失败

Flutter - iOS build failed in Android Studio

大家好。我最近开始进行 Flutter 开发。 Flutter 应用程序在 Android 设备上运行良好,但在 iOS 模拟器 {iPhone 12 Pro Max} 上无法 运行。附上错误日志。任何支持都会对我有很大帮助

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...
CocoaPods' output:

Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `6.26.0`
  > Copying FirebaseFirestore from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/External/FirebaseFirestore/1710a0cb4281a79dcbbb0d48c608d0a8` to `Pods/FirebaseFirestore`
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `device_info` from `.symlinks/plugins/device_info/ios`
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
firebase_analytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_crashlytics` from `.symlinks/plugins/firebase_crashlytics/ios`
firebase_crashlytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_dynamic_links` from `.symlinks/plugins/firebase_dynamic_links/ios`
firebase_dynamic_links: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
firebase_messaging: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
-> Fetching podspec for `flutter_local_notifications` from `.symlinks/plugins/flutter_local_notifications/ios`
-> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
-> Fetching podspec for `local_auth` from `.symlinks/plugins/local_auth/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `qr_code_scanner` from `.symlinks/plugins/qr_code_scanner/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `webview_flutter` from `.symlinks/plugins/webview_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only perfomed in repo update


  CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.11/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update

Comparing resolved specification to the sandbox manifest
  A Firebase
  A FirebaseAnalytics
  A FirebaseCore
  A FirebaseCoreDiagnostics
  A FirebaseCrashlytics
  A FirebaseDynamicLinks
  A FirebaseFirestore
  A FirebaseInstallations
  A FirebaseInstanceID
  A FirebaseMessaging
  A Flutter
  A GoogleAppMeasurement
  A GoogleDataTransport
  A GoogleUtilities
  A MTBBarcodeScanner
  A PromisesObjC
  A device_info
  A firebase_analytics
  A firebase_core
  A firebase_crashlytics
  A firebase_dynamic_links
  A firebase_messaging
  A flutter_local_notifications
  A image_picker
  A local_auth
  A nanopb
  A path_provider
  A qr_code_scanner
  A shared_preferences
  A webview_flutter

Downloading dependencies

-> Installing Firebase (7.3.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-t890wy --template= --single-branch --depth 1 --branch CocoaPods-7.3.0
  > Copying Firebase from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/Firebase/7.3.0-26223` to `Pods/Firebase`

-> Installing FirebaseAnalytics (7.3.0)
 > Http download
   $ /usr/bin/curl -f -L -o /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-sxmhc2/file.tgz https://dl.google.com/firebase/ios/analytics/53c80232c4841aca/FirebaseAnalytics-7.3.0.tar.gz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.10.1 cocoapods-downloader/1.4.0'
   $ /usr/bin/tar xfz /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-sxmhc2/file.tgz -C /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-sxmhc2
  > Copying FirebaseAnalytics from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseAnalytics/7.3.0-2580c` to `Pods/FirebaseAnalytics`

-> Installing FirebaseCore (7.3.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-kgut4v --template= --single-branch --depth 1 --branch CocoaPods-7.3.0
  > Copying FirebaseCore from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseCore/7.3.0-4d3c7` to `Pods/FirebaseCore`

-> Installing FirebaseCoreDiagnostics (7.3.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-m7p32v --template= --single-branch --depth 1 --branch CocoaPods-7.3.0
  > Copying FirebaseCoreDiagnostics from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseCoreDiagnostics/7.3.0-d50e1` to `Pods/FirebaseCoreDiagnostics`

-> Installing FirebaseCrashlytics (7.3.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-12xajsi --template= --single-branch --depth 1 --branch CocoaPods-7.3.0
 > Running prepare command
   $ /bin/bash -c  set -e cp -f ./Crashlytics/run ./run cp -f ./Crashlytics/upload-symbols ./upload-symbols
  > Copying FirebaseCrashlytics from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseCrashlytics/7.3.0-d3132` to `Pods/FirebaseCrashlytics`

-> Installing FirebaseDynamicLinks (7.3.1)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-l8nwk9 --template= --single-branch --depth 1 --branch CocoaPods-7.3.1
  > Copying FirebaseDynamicLinks from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseDynamicLinks/7.3.1-a6df9` to `Pods/FirebaseDynamicLinks`

-> Installing FirebaseFirestore (1.15.0)

-> Installing FirebaseInstallations (7.4.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-18p9k3m --template= --single-branch --depth 1 --branch CocoaPods-7.4.0
  > Copying FirebaseInstallations from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseInstallations/7.4.0-30646` to `Pods/FirebaseInstallations`

-> Installing FirebaseInstanceID (7.4.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-2aecdj --template= --single-branch --depth 1 --branch CocoaPods-7.4.0
  > Copying FirebaseInstanceID from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseInstanceID/7.4.0-46d93` to `Pods/FirebaseInstanceID`

-> Installing FirebaseMessaging (7.3.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-zsrdul --template= --single-branch --depth 1 --branch CocoaPods-7.3.0
  > Copying FirebaseMessaging from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/FirebaseMessaging/7.3.0-68d1b` to `Pods/FirebaseMessaging`

-> Installing Flutter (1.0.0)

-> Installing GoogleAppMeasurement (7.3.0)
 > Http download
   $ /usr/bin/curl -f -L -o /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-1xfyxa8/file.tgz https://dl.google.com/firebase/ios/analytics/b3a684e3e7264447/GoogleAppMeasurement-7.3.0.tar.gz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.10.1 cocoapods-downloader/1.4.0'
   $ /usr/bin/tar xfz /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-1xfyxa8/file.tgz -C /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-1xfyxa8
  > Copying GoogleAppMeasurement from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/GoogleAppMeasurement/7.3.0-8d3c0` to `Pods/GoogleAppMeasurement`

-> Installing GoogleDataTransport (8.1.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-w0wyzo --template= --single-branch --depth 1 --branch DataTransport-8.1.0
  > Copying GoogleDataTransport from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/GoogleDataTransport/8.1.0-116c8` to `Pods/GoogleDataTransport`

-> Installing GoogleUtilities (7.2.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-14xksqo --template= --single-branch --depth 1 --branch Utilities-7.2.0
  > Copying GoogleUtilities from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/GoogleUtilities/7.2.0-d8668` to `Pods/GoogleUtilities`

-> Installing MTBBarcodeScanner (5.0.11)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/mikebuss/MTBBarcodeScanner.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-ze3jec --template= --single-branch --depth 1 --branch 5.0.11
  > Copying MTBBarcodeScanner from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScanner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`

-> Installing PromisesObjC (1.2.12)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/google/promises.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-1w0fzbd --template= --single-branch --depth 1 --branch 1.2.12
  > Copying PromisesObjC from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/PromisesObjC/1.2.12-3113f` to `Pods/PromisesObjC`

-> Installing device_info (0.0.1)

-> Installing firebase_analytics (7.0.1)

-> Installing firebase_core (0.7.0)

-> Installing firebase_crashlytics (0.4.0-1)

-> Installing firebase_dynamic_links (0.7.0-1)

-> Installing firebase_messaging (8.0.0-dev.14)

-> Installing flutter_local_notifications (0.0.1)

-> Installing image_picker (0.0.1)

-> Installing local_auth (0.0.1)

-> Installing nanopb (2.30906.0)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/nanopb/nanopb.git /var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-lrf7bd --template= --single-branch --depth 1 --branch 0.3.9.6
  > Copying nanopb from `/Users/rakeshr/Library/Caches/CocoaPods/Pods/Release/nanopb/2.30906.0-1bf24` to `Pods/nanopb`

-> Installing path_provider (0.0.1)

-> Installing qr_code_scanner (0.2.0)

-> Installing shared_preferences (0.0.1)

-> Installing webview_flutter (0.0.1)
  - Running pre install hooks
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `qr_code_scanner` depends upon `MTBBarcodeScanner`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:151:in `verify_swift_pods_have_module_dependencies'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:40:in `validate!'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:595:in `validate_targets'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:162:in `install!'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.10.1/libexec/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.10.1/libexec/bin/pod:23:in `load'
/usr/local/Cellar/cocoapods/1.10.1/libexec/bin/pod:23:in `<main>'

Error output from CocoaPods:

     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    t890wy'...
     Note: switching to '77dae0b3ac1299102569265ff428a8c60922537d'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
100  474k  100  474k    0     0   241k      0  0:00:01  0:00:01 --:--:--  241k
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    kgut4v'...
     Note: switching to '77dae0b3ac1299102569265ff428a8c60922537d'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    m7p32v'...
     Note: switching to '77dae0b3ac1299102569265ff428a8c60922537d'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/            d20210121-27901-12xajsi'...
     Note: switching to '77dae0b3ac1299102569265ff428a8c60922537d'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    l8nwk9'...
     Note: switching to 'c67d97dc802aafe5474042156dce828e1c4145ca'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/            d20210121-27901-18p9k3m'...
     Note: switching to '14d31eb9e3c6ead8cb8af6892e8e68fa4354a286'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3950/3950), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/            d20210121-27901-2aecdj'...
     Note: switching to '14d31eb9e3c6ead8cb8af6892e8e68fa4354a286'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3950/3950), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    zsrdul'...
     Note: switching to '77dae0b3ac1299102569265ff428a8c60922537d'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
100 12.0M  100 12.0M    0     0   840k      0  0:00:14  0:00:14 --:--:--  906k
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    w0wyzo'...
     Note: switching to '77dae0b3ac1299102569265ff428a8c60922537d'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3635/3635), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/            d20210121-27901-14xksqo'...
     Note: switching to '14d31eb9e3c6ead8cb8af6892e8e68fa4354a286'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (3950/3950), done.
     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    ze3jec'...
     Note: switching to '69fbc9e3dfc2f260261f1f93f9634e283a764b17'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/            d20210121-27901-1w0fzbd'...
     Note: switching to 'afa9a1ace74e116848d4f743599ab83e584ff8cb'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false

     Cloning into '/var/folders/2k/xtw75v292z51wm3gq5k065vm0000gn/T/d20210121-27901-    lrf7bd'...
     Note: switching to '4502555fd3a11d2618e58c2053413b2ffcd9e59a'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by switching back to a branch.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -c with the switch command. Example:

       git switch -c <new-branch-name>

     Or undo this operation with:

       git switch -

     Turn off this advice by setting config variable advice.detachedHead to false


Error running pod install
Error launching application on iPhone 12 Pro Max.

PODFILE 下面

# Uncomment this line to define a global platform for your project
platform :ios, '10.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build     latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
    'Debug' => :debug,
    'Profile' => :release,
'Release' => :release,
}

pod 'Firebase/Core', '>= 0'
pod 'Firebase/Analytics','>= 0'


def flutter_root
    generated_xcode_build_settings_path = File.expand_path(File.join('..',      'Flutter', 'Generated.xcconfig'), __FILE__)
    unless File.exist?(generated_xcode_build_settings_path)
        raise "#{generated_xcode_build_settings_path} must exist. If you're             running pod     install manually, make sure flutter pub get is executed         first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try        deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin',  'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-   frameworks.git', :tag => '6.26.0'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
    end
end

pubspec.yaml下方

environment:
  sdk: ">=2.2.2 <3.0.0"

dependencies:
      flutter:
        sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  carousel_pro: ^0.0.13
  flutter_sparkline: ^0.1.0
  font_awesome_flutter: ^8.10.0
  shimmer: ^0.0.6
  rxdart: ^0.21.0
  bmnav: ^0.3.4
  carousel_slider: ^1.3.0
  percent_indicator: ^1.0.15
  get_it: ^1.0.3+2
  flutter_screen_lock: ^1.2.4
  #cloud_firestore: ^0.13.0+1
  flutter_localizations:
  sdk: flutter
  #camera: ^0.5.8+2
  path_provider: ^1.6.11
  path: ^1.6.4
  #image_picker: ^0.6.7+14
  #firebase_core: ^0.5.2
  #firebase_crashlytics: ^0.1.3
  #firebase_crashlytics: ^0.2.3
  firebase_messaging: ^8.0.0-dev.14
  # Add the dependency for the Firebase Core Flutter SDK
  firebase_core: ^0.7.0
  # Add the dependency for the FlutterFire plugin for Google Analytics
  firebase_analytics: ^7.0.1
  # Add the dependency for the FlutterFire plugin for Crash Analytics
  firebase_crashlytics: ^0.4.0+1
  #WEBVIEW
  webview_flutter: ^1.0.7
  #biometric
  local_auth: ^0.6.3+4
  firebase_dynamic_links: ^0.7.0+1
  flutter_local_notifications: ^3.0.1+3
  device_info: ^1.0.0
  toast: ^0.1.5
  flutter_lock_screen: ^1.0.8
  #Pattern Lock
  pattern_lock: ^1.0.3
  #Shared Preference
  shared_preferences: ^0.5.12+4
  #Pincode
  passcode_screen: ^1.2.2+1
  #Progress indicator
  modal_progress_hud: ^0.1.3
  #IMAGE PICKER
  image_picker: ^0.6.7+21
  #QR CODE
  qr_code_scanner: ^0.2.1
  #qr_code_scanner:
  #git:
  #url: git://github.com/juliuscanute/qr_code_scanner
  #ref: 181-nullpointer
  intl: ^0.16.1
  get: ^3.24.0
  #flip card
  flip_card: ^0.4.4
  #SECURITY
  #flutter_windowmanager: ^0.0.2

谁能帮我解决这个问题?我已经尝试了很多我在网上找到的其他解决方案,但似乎没有任何效果,而且我不知道该怎么做才能使这项工作成功。

打开您的 /ios/Podfile 并将以下任何全局变量添加到文件顶部:

platform :ios, '11.0'
$FirebaseSDKVersion = '6.33.0'

它将解决您的问题。

下面是我的pubspec.yaml

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

firebase_analytics: ^7.0.1
firebase_auth: ^0.20.1
firebase_core: ^0.7.0
firebase_crashlytics: ^0.4.0+1
firebase_messaging: ^8.0.0-dev.15