繁体   English   中英

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

[英]Unable to run my flutter app on ios simulator which is working perfectly on android simulator. Error running pod install

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

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

运行 pod install... 860ms

CocoaPods 的 output:↳ 准备中

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 的错误 output:↳

[!] 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。这个错误已经困扰我好几天了。 我不确定,但这可能会解决它。

请尝试在ios/flutter/AppFrameworkInfo.plist中增加最小部署目标,命名为MinimumOSVersion 还可以尝试在ios/Podfile中增加部署目标:

source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
...

这个答案另一个中提取

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM