首页 > 解决方案 > Flutter 应用程序未在 ios 上运行(来自 CocoaPods 的错误输出)

问题描述

我的颤振应用程序没有在 ios 模拟器上运行,这就是它所说的:

   [!] Automatically assigning platform `iOS` with version `9.0` on target
    `Runner` because no platform was specified. Please specify a platform for
    this target in your Podfile. See
    `https://guides.cocoapods.org/syntax/podfile.html#platform`.

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

当我运行颤振医生时,它显示了这一点:

[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2 20D64 darwin-arm, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.54.3)
[✓] Connected device (2 available)

此外,当我对此发表评论时,platform :ios, '9.0'它向我展示了这一点:

fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `admob_flutter` from `.symlinks/plugins/admob_flutter/ios`
    -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
    cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_admob` from `.symlinks/plugins/firebase_admob/ios`
    -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
    firebase_auth: 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 `geocoder` from `.symlinks/plugins/geocoder/ios`
    -> Fetching podspec for `location` from `.symlinks/plugins/location/ios`
    -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/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_5_9_a.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/5/9/a/Google-Mobile-Ads-SDK/8.1.0/Google-Mobile-Ads-SDK.podspec.json exists! Returning local because checking is only
      perfomed in repo update
    [!] CocoaPods could not find compatible versions for pod "cloud_firestore":
      In Podfile:
        cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)

    Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum
    deployment target.

    

请有人帮忙解决这个问题,这个问题已经有一段时间了。

标签: iosxcodeflutterdartcocoapods

解决方案


检查 iOS 文件夹中的 Podfile 并将全局版本设置为 9.0

取消注释此行以为您的项目定义一个全球平台

平台:ios,'9.0'


推荐阅读