Cocoapods xcworkspace 文件丢失并出现错误

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

使用终端在我的项目中创建Cocoapods。 但是在命令之后 .xcworkspace 丢失了......

命令

/usr/local/bin/pod install

堆栈 可可豆:1.15.2 Ruby:ruby 2.6.3p62(2019-04-16 修订版 67580)[universal.x86_64-darwin19] 红宝石宝石:3.0.3 主机:Mac OS X 10.15.7 (19H15) Xcode:12.4(12D4e) Git :git 版本 2.24.3 (Apple Git-128) Ruby lib 目录:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib 存储库:主干 - CDN - https://cdn.cocoapods.org/

插件 cocoapods-分解:1.0.5 cocoapods-插件:1.0.0 cocoapods-搜索:1.0.1 cocoapods-主干:1.6.0 cocoapods-尝试:1.2.0

报告

  • 你做了什么?pod install

  • 您期望发生什么?创建文件 .xcworkspace

  • 发生了什么? .xcworkspace 丢失并出现此错误消息 [!] 哦不,发生了错误。

Podfile

platform :ios, '9.0'

target 'Flash Chat iOS13' do

  use_frameworks!

  # Pods for Flash Chat iOS13

pod 'CLTypingLabel'

end

错误 REXML::ParseException - # /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/source.rb:220:in

scan' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/source.rb:220:in 
match' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/baseparser.rb:227:in
pull_event' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/baseparser.rb:207:in 
pull' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:23:in
parse' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:448:in 
build' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:101:in
initialize' /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:50:in 
new' /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:50:in
initialize' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:111:in 
new' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:111:in
create_workspace' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:71:in 
集成!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:929:in
block in integrate_user_project' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in 
部分' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:925:in
integrate_user_project' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:185:in 
集成' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in
install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in 
run' /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in
run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in 
run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in
<top (required)>' /usr/local/bin/pod:23:in 
load' /usr/local/bin/pod:23:在“”中 ... 错误的参数类型字符串(预期的正则表达式) 线路:1 位置:38 最后 80 个未使用的字符:

/Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:96:in

rescue in parse' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:21:in 
parse' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:448:in
build' /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:101:in 
初始化' /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:50:in
new' /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:50:in 
初始化' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:111:in
new' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:111:in 
create_workspace' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:71:在Integrate_user_project'中的
integrate!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:929:in 
块中 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in
section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:925:in 
integrate_user_project' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:185:in
integrate' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in 
安装! /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in
run' /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in 
run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in
run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in 
' /usr/local/bin/pod:23:in
load' /usr/local/bin/pod:23:in 
'

xcode macos terminal cocoapods
1个回答
0
投票

我正在 Flutter + Dart 上构建并遇到了同样的问题。 Pod 安装失败。

要解决此问题,

uninstall cocoapods
ffi
Re-install cocoapods
,但您可能需要删除现有链接并
re-link
到新位置。

  1. sudo gem uninstall cocoapods && gem uninstall ffi
  2. brew install cocoapods
  3. brew link --overwrite cocoapods
© www.soinside.com 2019 - 2024. All rights reserved.