【Flutter&iOS】cocoapod 1.9.1 pod install失败

cocoapods更新到1.9.1后遇到的问题(持续更新)(本文仅自己记录使用,仅供参考)

问题一:

sunyd@sunyddeiMac ios % pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /Users/sunyd/Desktop/DevelopTool/flutter/bin in PATH, mode 040777
Analyzing dependencies
Downloading dependencies
Installing AMapFoundation (1.6.3)
Installing AMapLocation (2.6.5)
Installing AMapNavi (7.4.0)
Installing AMapSearch (7.3.0)
Installing FIJKPlayer (0.4.4)
Installing FMDB (2.7.5)
Installing Flutter (1.0.0)
Installing HandyJSON (5.0.1)
Installing JCore (2.2.5)
Installing JPush (3.3.2)
Installing MJExtension (3.2.1)
Installing Reachability (3.2)
Installing TXIMSDK_iOS (4.7.2)
Installing amap_base (0.1.8)
Installing fijkplayer (0.4.2)
Installing flutter_qr_reader (0.0.1)
Installing fluttertoast (0.0.2)
Installing image_gallery_saver (0.0.1)
Installing image_picker (0.0.1)
Installing jpush_flutter (0.0.2)
Installing keyboard_visibility (0.5.0)
Installing open_file (0.0.1)
Installing orientation (0.0.1)
Installing path_provider (0.0.1)
Installing permission_handler (4.2.0+hotfix.3)
Installing shared_preferences (0.0.1)
Installing sqflite (0.0.1)
Installing tencent_im_plugin (0.0.1)
Installing url_launcher (0.0.1)
Installing xfvoice (0.0.1)
Generating Pods project
Integrating client project

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

Command

/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.9.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.1.2
        Host : Mac OS X 10.15.1 (19B88)
       Xcode : 11.2.1 (11B500)
         Git : git version 2.21.0 (Apple Git-122.2)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  use_frameworks!

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

# Prevent CocoaPods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Error

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/sunyd/Desktop/SVN/MIOT-19-Project/33_ZLZHWY/01_SOURCE/01_Flutter/zlzhwy/ios/Pods/Local Podspecs/fijkplayer.podspec.json
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:673:in `read'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:673:in `checksum'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/lockfile.rb:533:in `block in generate_checksums'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/lockfile.rb:532:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/lockfile.rb:532:in `generate_checksums'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/lockfile.rb:428:in `generate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:744:in `generate_lockfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:752:in `write_lockfiles'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:164:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

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

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fsunyd%2FDesktop%2FSVN%2FMIOT-19-Project%2F33_ZLZHWY%2F01_SOURCE%2F01_Flutter%2Fzlzhwy%2Fios%2FPods%2FLocal+Podspecs%2Ffijkplayer.podspec.json&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...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new

 

这个问题困扰了我好一阵子,到github的cocoapods上找解决方案,都是类似的问题,但是和我这个并不一样。

后来在把依赖全部都注释掉后,一个一个的放开,pod install
找到问题原因,是因为fijkplayer这个插件,导致的错误。
后来把所有插件放开,单独注释掉fijkplayer,pod install成功。
在把fijkplayer放开,pod install成功,具体原因,不知道,记录一下。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值