gpt4 book ai didi

flutter - 在iOS中运行flutter应用程序时出错

转载 作者:行者123 更新时间:2023-12-04 14:04:10 26 4
gpt4 key购买 nike

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
正在运行 pod 安装...
CocoaPods 的输出:

CDN:trunk 相对路径:CocoaPods-version.yml 存在!返回本地,因为检查仅在 repo 更新中执行
CocoaPods 的错误输出:

警告:CocoaPods 要求您的终端使用 UTF-8 编码。
考虑将以下内容添加到 ~/.profile:
    export LANG=en_US.UTF-8

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `unicode_normalize'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `installation_root'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:226:in `podfile_path'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/user_interface/error_report.rb:30:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `unicode_normalize'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `installation_root'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:226:in `podfile_path'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:205:in `podfile'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command/install.rb:46:in `run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
运行 pod install 时出错
在 iPhone 12 Pro Max 上启动应用程序时出错。
enter image description here
enter image description here

最佳答案

这似乎是 Cocoapods v 1.11.0 中的一种错误/不兼容问题
为了解决这个问题,我按照以下步骤操作,它就像一个魅力:https://stackoverflow.com/a/69076515/16881741
简而言之,请按照以下步骤操作:

  • 在您的终端中,在 ios 文件夹类型中gem list --local | grep cocoapods
  • 记下上一个命令的输出是什么。看起来像这样(请忽略各个条目附近的版本,这是我的输出,我已经使用了 1.10.1 版本):
  • cocoapods (1.10.1)
    cocoapods-core (1.10.1)
    cocoapods-deintegrate (1.0.5)
    cocoapods-downloader (1.5.1)
    cocoapods-plugins (1.0.0)
    cocoapods-search (1.0.1)
    cocoapods-trunk (1.6.0)
    cocoapods-try (1.2.0)
  • 一一启动命令sudo gem uninstall X用 cocoapods 组件的名称替换“X”,不包含版本。
    最后你应该得到这个:
  • sudo gem uninstall cocoapods
    sudo gem uninstall cocoapods-core
    sudo gem uninstall cocoapods-deintegrate
    sudo gem uninstall cocoapods-downloader
    sudo gem uninstall cocoapods-plugins
    sudo gem uninstall cocoapods-search
    sudo gem uninstall cocoapods-trunk
    sudo gem uninstall cocoapods-try
    确保已包含第 n.1 点中列出的所有组件以避免脏状态
  • 使用命令sudo gem install cocoapods -v 1.10.1获取正确的版本。

  • 我在顶部链接的答案的作者埃斯特类·洛佩兹 (Esteban Lopez) 的所有荣誉。

    关于flutter - 在iOS中运行flutter应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69070537/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com