【问题标题】:I am getting error while running the flutter project for iOS运行 iOS 的颤振项目时出现错误
【发布时间】:2021-03-18 13:33:06
【问题描述】:

在 iOS 中运行颤振项目时出现低于输出错误。

此错误与 Cocoapods 有关。

请指导我该如何解决。

早期的错误与我升级到 9.0 的 iOS 版本 8.0 相关,之后我遇到了这个问题并且在运行 iOS 时遇到错误

CocoaPods' output:
↳
      Preparing

    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 `mapbox_gl` from `.symlinks/plugins/mapbox_gl/ios`
    [!] No podspec found for `mapbox_gl` in `.symlinks/plugins/mapbox_gl/ios`

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:989:in `fetch_external_source'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:968:in `block (2 levels) in fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:967:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:967:in `block in fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:966:in `fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:414:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:160:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/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.0/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>'
    /usr/local/Cellar/cocoapods/1.10.0/libexec/bin/pod:23:in `load'
    /usr/local/Cellar/cocoapods/1.10.0/libexec/bin/pod:23:in `<main>'


Error output from 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`.

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

【问题讨论】:

    标签: ios flutter dart cocoapods


    【解决方案1】:

    您可以尝试通过删除 podfile 中的 # 来取消注释 platform :ios, '9.0'。然后重新安装 pod。

    【讨论】:

    • 对不起,到目前为止它对我没有帮助,我按照你说的做了,运行flutter clean然后尝试安装应用程序,我又遇到了同样的错误
    • 有时,flutter clean 本身是不够的。也可以尝试删除ios/Podfile.lock、ios/Pods、ios/Flutter/App.Framework。
    • 你的意思是 ios/Flutter/Flutter.Framework ??
    • 是的,你是对的!也删除 ios/Flutter/Flutter.Framework。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-13
    • 2022-07-07
    • 2022-11-04
    • 2020-03-13
    • 2021-07-08
    • 2021-09-05
    • 2021-01-05
    相关资源
    最近更新 更多