ios - 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.
请有人帮忙解决这个问题,这个问题已经有一段时间了。
解决方案
检查 iOS 文件夹中的 Podfile 并将全局版本设置为 9.0
取消注释此行以为您的项目定义一个全球平台
平台:ios,'9.0'
推荐阅读
- c# - 我在 SQL Server 数据库中有一个标量函数,我想使用 ADO.NET 调用它,但它总是返回 null
- java - 如何与 AlertDialog 内的 Adapter 内的 Adapter 的 Fragment 内的 AlertDialog 视图进行交互?
- ios - 如何在不使用贝塞尔路径的情况下为矩形视图提供不同的角半径
- javascript - 如何为页面上的多个玩家修复 Angular Elements 中的“TypeError:youTubeIframeAPIReady 不是函数”
- android - 如何使用 Android Studio 中的分享按钮分享图片?
- javascript - 由于性能原因,我应该在 node.js API 上使用 ES6 吗?
- scala - 模式匹配没有给出预期的结果
- elasticsearch - Elasticsearch——根据嵌套对象中的值对文档进行排序
- c# - 使用 vsto 将用户控件添加到导航窗格
- javascript - 我可以向 pinterest 跟踪 javascript 添加多个跟踪 ID