尝试在 iPhone 11 pro max - 13.2.2 模拟器上运行时出现此错误。
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...CocoaPods' output: ↳ [!] Invalid `Podfile` file: Operation not supported on socket @ rb_file_s_symlink -
(/Users/x/flutter/bin/cache/artifacts/engine, .symlinks/flutter).
from /Volumes/VMware Shared Folders/C/app/ios/Podfile:51
------------------------------------------- # symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink) # pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) #
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:301:in
rescue in block in from_ruby' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:295:in
阻止 from_ruby' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:ininstance_eval' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in
初始化' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:innew' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in
来自_ruby' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:259:infrom_file' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/config.rb:200:in
podfile' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:150:inverify_podfile_exists!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:46:in
运行' /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:inrun' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in
运行'/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in<top (required)>' /usr/local/bin/pod:23:in
加载' /usr/local/bin/pod:23:in `'运行 pod install 时出错,在 iPhone 11 Pro 上启动应用程序时出错 最大。
block 引用>
pod --version 1.8.4
最佳答案
当我的文件存储在 Windows NTFS 中并且我尝试从 MAC 访问它时,我遇到了类似的错误,为了解决该问题,我将文件夹从 Windows NTFS 分区移动到桌面。
当您的 MAC 无法在不受支持的分区上创建符号链接(symbolic link)文件时,会出现符号链接(symbolic link)错误。
关于ios - 无效 `Podfile` 文件 : Operation not supported on socket error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59040343/