iOS筆記2022-03-25:cocoapods報(bào)錯(cuò)

今天重新安裝了下mac 蒙特利系統(tǒng),配置iOS開發(fā)環(huán)境,在安裝了cocoapods后pod install箩朴,報(bào)錯(cuò)如下:

Analyzing dependencies

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

### Command
/usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod install


### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

   CocoaPods : 1.11.3
        Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
    RubyGems : 3.0.3.1
        Host : macOS 12.3 (21E230)
       Xcode : 13.3 (13E113)
         Git : git version 2.32.0 (Apple Git-132)
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.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0


### Podfile

ruby
# Uncomment this line to define a global platform for your project
platform :ios, '9.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 flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 11.0
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
      end
    end
  end
end

### Error

JSON::ParserError - 767: unexpected token at '{
  "name": "SDWebImage",
  "version": "5.12.5",
  "platforms": {
    "osx": "10.11",
    "ios": "9.0",
    "tvos": "9.0",
    "watchos": "2.0"
  },
  "license": "MIT",
  "summary": "Asynchronous image downloader with cache support with an UIImageView category.",
  "homepage": "https://github.com/SDWebImage/SDWebImage",
  "authors": {
    "Olivier Poitrey": "rs@dailymotion.com"
  },
  "source": {
    "git": "https://github.com/SDWebImage/SDWebImage.git",
    "tag": "5.12.5"
  },
  "description": "This library provides a category for UIImageView with support for remote images coming from the web. It provides an UIImageView category adding web image and cache management to the Cocoa Touch framework, an asynchronous image downloader, an asynchronous memory + disk image caching with automatic cache expiration handling, a guarantee that the same URL won't be downloaded several times, a guarantee that bogus URLs won't be retried again and again, and performances!",
  "requires_arc": true,
  "frameworks": "ImageIO",
  "default_subspecs": "Core",
  "pod_target_xcconfig": {
    "SUPPORTS_M'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification.rb:748:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification.rb:722:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source.rb:188:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/set.rb:56:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:216:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/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.11.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `load'
/usr/local/Cellar/cocoapods/1.11.3/libexec/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=767%3A+unexpected+token+at+%27%7B%0A++%22name%22%3A+%22SDWebImage%22%2C%0A++%22version%22%3A+%225.12.5%22%2C%0A++%22platforms%22%3A+%7B%0A++++%22osx%22%3A+%2210.11%22%2C%0A++++%22ios%22%3A+%229.0%22%2C%0A++++%22tvos%22%3A+%229.0%22%2C%0A++++%22watchos%22%3A+%222.0%22%0A++%7D%2C%0A++%22license%22%3A+%22MIT%22%2C%0A++%22summary%22%3A+%22Asynchronous+image+downloader+with+cache+support+with+an+UIImageView+category.%22%2C%0A++%22homepage%22%3A+%22https%3A%2F%2Fgithub.com%2FSDWebImage%2FSDWebImage%22%2C%0A++%22authors%22%3A+%7B%0A++++%22Olivier+Poitrey%22%3A+%22rs%40dailymotion.com%22%0A++%7D%2C%0A++%22source%22%3A+%7B%0A++++%22git%22%3A+%22https%3A%2F%2Fgithub.com%2FSDWebImage%2FSDWebImage.git%22%2C%0A++++%22tag%22%3A+%225.12.5%22%0A++%7D%2C%0A++%22description%22%3A+%22This+library+provides+a+category+for+UIImageView+with+support+for+remote+images+coming+from+the+web.+It+provides+an+UIImageView+category+adding+web+image+and+cache+management+to+the+Cocoa+Touch+framework%2C+an+asynchronous+image+downloader%2C+an+asynchronous+memory+%2B+disk+image+caching+with+automatic+cache+expiration+handling%2C+a+guarantee+that+the+same+URL+won%27t+be+downloaded+several+times%2C+a+guarantee+that+bogus+URLs+won%27t+be+retried+again+and+again%2C+and+performances%21%22%2C%0A++%22requires_arc%22%3A+true%2C%0A++%22frameworks%22%3A+%22ImageIO%22%2C%0A++%22default_subspecs%22%3A+%22Core%22%2C%0A++%22pod_target_xcconfig%22%3A+%7B%0A++++%22SUPPORTS_M%27&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...
Searching for inspections failed: undefined method `map' for nil:NilClass

解決辦法:

rm -rf ~/.cocoapods/repos/trunk/
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末丽已,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子沉颂,更是在濱河造成了極大的恐慌,老刑警劉巖悦污,帶你破解...
    沈念sama閱讀 218,640評論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件铸屉,死亡現(xiàn)場離奇詭異,居然都是意外死亡切端,警方通過查閱死者的電腦和手機(jī)彻坛,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,254評論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來踏枣,“玉大人昌屉,你說我怎么就攤上這事∫鹌伲” “怎么了间驮?”我有些...
    開封第一講書人閱讀 165,011評論 0 355
  • 文/不壞的土叔 我叫張陵,是天一觀的道長马昨。 經(jīng)常有香客問我竞帽,道長,這世上最難降的妖魔是什么鸿捧? 我笑而不...
    開封第一講書人閱讀 58,755評論 1 294
  • 正文 為了忘掉前任屹篓,我火速辦了婚禮,結(jié)果婚禮上匙奴,老公的妹妹穿的比我還像新娘堆巧。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,774評論 6 392
  • 文/花漫 我一把揭開白布谍肤。 她就那樣靜靜地躺著啦租,像睡著了一般。 火紅的嫁衣襯著肌膚如雪荒揣。 梳的紋絲不亂的頭發(fā)上刷钢,一...
    開封第一講書人閱讀 51,610評論 1 305
  • 那天,我揣著相機(jī)與錄音乳附,去河邊找鬼。 笑死伴澄,一個(gè)胖子當(dāng)著我的面吹牛赋除,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播非凌,決...
    沈念sama閱讀 40,352評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼举农,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了敞嗡?” 一聲冷哼從身側(cè)響起颁糟,我...
    開封第一講書人閱讀 39,257評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎喉悴,沒想到半個(gè)月后棱貌,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,717評論 1 315
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡箕肃,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,894評論 3 336
  • 正文 我和宋清朗相戀三年婚脱,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片勺像。...
    茶點(diǎn)故事閱讀 40,021評論 1 350
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡障贸,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出吟宦,到底是詐尸還是另有隱情篮洁,我是刑警寧澤,帶...
    沈念sama閱讀 35,735評論 5 346
  • 正文 年R本政府宣布殃姓,位于F島的核電站袁波,受9級特大地震影響嚎朽,放射性物質(zhì)發(fā)生泄漏海雪。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,354評論 3 330
  • 文/蒙蒙 一付呕、第九天 我趴在偏房一處隱蔽的房頂上張望宛篇。 院中可真熱鬧娃磺,春花似錦、人聲如沸叫倍。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,936評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至听诸,卻和暖如春坐求,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背晌梨。 一陣腳步聲響...
    開封第一講書人閱讀 33,054評論 1 270
  • 我被黑心中介騙來泰國打工桥嗤, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人仔蝌。 一個(gè)月前我還...
    沈念sama閱讀 48,224評論 3 371
  • 正文 我出身青樓泛领,卻偏偏與公主長得像,于是被迫代替她去往敵國和親敛惊。 傳聞我的和親對象是個(gè)殘疾皇子渊鞋,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,974評論 2 355

推薦閱讀更多精彩內(nèi)容

  • CocoaPods 使用指南: 最近使用cocoapods 遇到的問題 [!] CDN: trunk Repo u...
    執(zhí)拗的男孩閱讀 271評論 0 1
  • 1.羽絨服 穿中長款,長度在PP下面一點(diǎn)瞧挤、大腿中間锡宋,它比短款保暖,又不會像長款那么容易顯胖特恬,很好地兼顧了保暖和時(shí)髦...
    快樂的小木閱讀 172評論 0 0
  • 前言 近幾年來执俩,我國電子商務(wù)交易規(guī)模越來越大,線上訂單越來越多癌刽,退換貨的情況也越來越常見奠滑。退換貨環(huán)節(jié)是線上購物過程...
    老楊占線閱讀 1,142評論 0 0
  • 今天 來談188男團(tuán) 這是這個(gè)圈內(nèi)最出名的人物合集。個(gè)個(gè)錢多貌美 水千丞的文就是這樣妒穴,酸爽宋税,暢快,雖然很狗血讼油,但就...
    三月的月光閱讀 226評論 0 1
  • 用到的組件 1杰赛、通過CocoaPods安裝 2、第三方類庫安裝 3矮台、第三方服務(wù) 友盟社會化分享組件 友盟用戶反饋 ...
    SunnyLeong閱讀 14,618評論 1 180