XCode14创建的项目 pod init或pod install报错

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

```

/Users/xinhualong/.rvm/gems/ruby-3.0.0/bin/pod install

```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?

### Stack

```

CocoaPods : 1.11.3

Ruby : ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin21]

RubyGems : 3.3.10

Host : macOS 12.6 (21G115)

Xcode : 14.0.1 (14A400)

Git : git version 2.37.0 (Apple Git-136)

Ruby lib dir : /Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib

Repositories : 6-ios-xhlprivaterepoforios-xhlspecs-gitspecs - git - http://192.168.6.66:81/ios/XhlPrivateRepoForIOS/xhlSpecs/gitSpecs.git @ 36305fb3ccf201dae73e814587c349a84041350c

master - git - https://github.com/CocoaPods/Specs.git @ 4840327ea7821cb758166861c28f7cc8952531a9

trunk - CDN - https://cdn.cocoapods.org/

```

### Plugins

```

cocoapods-deintegrate : 1.0.5

cocoapods-plugins : 1.0.0

cocoapods-search : 1.0.1

cocoapods-trunk : 1.6.0

cocoapods-try : 1.2.0

```

### Podfile

```ruby

# Uncomment the next line to define a global platform for your project

# platform :ios, '9.0'

target 'HlwChatDemo' do

pod 'RongCloudRTC_Private'

pod 'RongCloudIM_Private'

target 'HlwChatDemoTests' do

inherit! :search_paths

# Pods for testing

end

target 'HlwChatDemoUITests' do

# Pods for testing

end

end

```

### Error

```

Encoding::CompatibilityError - incompatible character encodings: UTF-8 and ASCII-8BIT

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1564:in `join'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1564:in `join'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1224:in `path'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:500:in `block in copy_entry'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1513:in `wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1516:in `block in wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1515:in `each'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1515:in `wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1516:in `block in wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1515:in `each'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1515:in `wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1516:in `block in wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1515:in `each'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1515:in `wrap_traverse'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:497:in `copy_entry'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:471:in `block in cp_r'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1597:in `block in fu_each_src_dest'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1613:in `fu_each_src_dest0'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:1595:in `fu_each_src_dest'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/fileutils.rb:470:in `cp_r'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/downloader.rb:55:in `block (2 levels) in download'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/downloader/cache.rb:128:in `lock'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/downloader/cache.rb:84:in `read_lock'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/downloader.rb:53:in `block in download'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in `message'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/downloader.rb:52:in `download'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/pod_source_installer.rb:118:in `download_source'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:563:in `install_source_of_pod'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:514:in `block (2 levels) in install_pod_sources'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:86:in `titled_section'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:513:in `block in install_pod_sources'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:496:in `each'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:496:in `install_pod_sources'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:255:in `block in download_dependencies'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:254:in `download_dependencies'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:162:in `install!'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'

/Users/xinhualong/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.11.3/bin/pod:55:in `'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/bin/pod:25:in `load'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/bin/pod:25:in `

'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `eval'

/Users/xinhualong/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `

'

```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:

https://github.com/CocoaPods/CocoaPods/search?q=incompatible+character+encodings%3A+UTF-8+and+ASCII-8BIT&type=Issues

If none exists, create a ticket, with the template displayed above, on:

https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:

https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

- Encoding::CompatibilityError - incompatible character encodings: ASCII-8BIT and UTF-8

https://github.com/CocoaPods/CocoaPods/issues/4582 [closed] [9 comments]

25 Jul 2022

- Encoding::CompatibilityError - incompatible character encodings: UTF-8 and ASCII-8BIT with pod install

https://github.com/CocoaPods/CocoaPods/issues/10516 [closed] [7 comments]

07 Jun 2022

- Nanaimo parse error

https://github.com/CocoaPods/CocoaPods/issues/6108 [closed] [19 comments]

25 Nov 2022

and 13 more at:

https://github.com/cocoapods/cocoapods/search?q=incompatible%20character%20encodings%3A%20UTF-8%20and%20ASCII-8BIT&type=Issues&utf8=✓

更新XCode14第一次pod init还是pod install都失败,在以前的pod过得项目上面就可以,以前上报错信息,网上都说更新pod,全试过了,最后都卸载重装pod也不行, 困扰了一天最后在https://github.com/CocoaPods/CocoaPods/issues/11546 github pod 问题站上面找到解决方法了

解决方法:

XCode14创建的项目 pod init或pod install报错_第1张图片

选中项目,修改Project Format 为最低版本Xcode 3.1-compatible,如图:

XCode14创建的项目 pod init或pod install报错_第2张图片

你可能感兴趣的:(xcode,ios,cocoapods)