CocoaPods 错误:Unicode 规范化不适合 ASCII-8BIT(编码::兼容性错误)

问题描述 投票:0回答:1

我尝试在 iPhone 15 Pro 模拟器上运行 Flutter 项目的 pod install 时遇到问题。该错误消息表明 ASCII-8BIT 编码的 Unicode 规范化存在问题。以下是简短的错误日志:

对于完整日志 -> https://pastebin.com/LxUXZxTw

Error output from CocoaPods:
↳
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8

/Users/chandan/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /Users/chandan/.rvm/rubies/ruby-3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.15.2/lib/cocoapods/config.rb:167:in `unicode_normalize'
    from /Users/chandan/.rvm/rubies/ruby-3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.15.2/lib/cocoapods/config.rb:167:in `installation_root'
    from /Users/chandan/.rvm/rubies/ruby-3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.15.2/lib/cocoapods/config.rb:227:in `podfile_path'

android ios flutter unicode
1个回答
0
投票

修复此错误非常简单:

只需遵循以下 3 个步骤即可。

STEP-1:打开新终端并运行此命令

open ~/.zshrc
Sample image of step 1

STEP-2:在

.zshrc
文件的最后一行中粘贴此
export LANG=en_US.UTF-8
并保存。 Sample image of step 2

STEP-3:打开 Android Studio 转到文件 -> 使缓存无效... -> 选择所有选项 -> 然后单击无效并重新启动。

Sample image of step 4

last step

© www.soinside.com 2019 - 2024. All rights reserved.