微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法在 ios 模拟器上运行我的 flutter 应用程序,该应用程序在 android 模拟器上运行良好运行 pod install 时出错

如何解决无法在 ios 模拟器上运行我的 flutter 应用程序,该应用程序在 android 模拟器上运行良好运行 pod install 时出错

一个合作者在 windows 中创建了这个项目,我已经在我的 m1 macs 中克隆了它并尝试在 ios 模拟器中运行它。 这些是我在项目文件夹中执行 Flutter run 时的日志。

在调试模式下在 iPhone 12 Pro Max 上启动 lib/main.dart...

正在运行 pod 安装... 860 毫秒

CocoaPods 的输出: ↳ 准备

Analyzing dependencies

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

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `better_player` from `.symlinks/plugins/better_player/ios`
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
-> Fetching podspec for `Flutter_ffmpeg` from `.symlinks/plugins/Flutter_ffmpeg/ios`
-> Fetching podspec for `gallery_saver` from `.symlinks/plugins/gallery_saver/ios`
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `photo_manager` from `.symlinks/plugins/photo_manager/ios`
-> Fetching podspec for `simple_image_crop` from `.symlinks/plugins/simple_image_crop/ios`
-> Fetching podspec for `stripe_payment` from `.symlinks/plugins/stripe_payment/ios`
-> Fetching podspec for `vibration` from `.symlinks/plugins/vibration/ios`
-> Fetching podspec for `video_player` from `.symlinks/plugins/video_player/ios`
-> Fetching podspec for `video_thumbnail` from `.symlinks/plugins/video_thumbnail/ios`
-> Fetching podspec for `wakelock` from `.symlinks/plugins/wakelock/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_2_5_a.txt exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/2/5/a/KTVHTTPCache/2.0.1/KTVHTTPCache.podspec.json exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods Could not find compatible versions for pod "firebase_auth":
  In Podfile:
    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)

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

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

CocoaPods 的错误输出: ↳

[!] 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`.

运行 pod install 时出错 在 iPhone 12 Pro Max 上启动应用程序时出错。

解决方法

在 podfile 中尝试将 ios 版本分配给 10。这个错误已经困扰我好几天了。我不确定,但这可能会解决它。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。