An error occurred while processing the post-install hook of the Podfile

2023.04.21
flutter项目里使用了百度地图,其中 flutter_bmflocation .ios pod install 时报错如图:


image.png

其中这两句重点关注一下,不知道是啥造成的。

[!] An error occurred while processing the post-install hook of the Podfile.

wrong number of arguments (given 0, expected 1..2)

哪位朋友遇到过这种问题?

2023.05.15
问题终于得到了解决:
其实很简单!但是我不知道!!那就是在flutter生成的.ios 文件的 Podfile文件中加入私有库依赖的source,因为项目第一次运行,或升级了mac,依赖需要拉取新的,而索引里没有source,所以之前没加过,而这次需要加点。

source 'https://github.com/CocoaPods/Specs.git'
source '[email protected]:mobile/native-common/iOS-Common/CRM-PodSpecs.git'
source '[email protected]:mobile/ios/common/YBMRepos.git'
source '[email protected]:mobile/canary-ios-repo.git'
source '[email protected]:mobile/apm-cly/ios-sdk-repo.git'

#platform :ios, '11.0'

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

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

你可能感兴趣的:(An error occurred while processing the post-install hook of the Podfile)