如何解析Warning: CocoaPods is installed but broken. Skipping Pod install. You appear to have cocoa pods installed but its not working.
消息
问题:
- 如果我创建一个新项目并在IOS上运行它可以正常工作,但从以前的项目中它不能在IOS上工作。
- 如果我从Xcode中打开运行器文件,它会启动,但不会从android studio启动。
因此,当在文件中安装pod时,它会给我这个错误:
/系统/图书馆/框架/Ruby.framework/版本/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb: 54:
require': dlopen(/Library/Ruby/Gems/2.6.0/gems/date-3.2.2/lib/date_core.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/date-3.2.2/lib/date_core.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) - /Library/Ruby/Gems/2.6.0/gems/date-3.2.2/lib/date_core.bundle (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
需要'
那么你能解释一下我如何解决这个错误吗?
From: https://github.com/flutter/flutter/issues/54962#issuecomment-635443559
已解决:原来这不是cocoapods本身的问题。我所做的三件事:
- sudo gem update
我启动了Xcode,我已经忘记我已经更新了它需要安装附加组件。- 我重新启动了visual studio代码
之后一切正常。