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 'git@git.int.ybm100.com:mobile/native-common/iOS-Common/CRM-PodSpecs.git'
source 'git@git.int.ybm100.com:mobile/ios/common/YBMRepos.git'
source 'git@git.int.ybm100.com:mobile/canary-ios-repo.git'
source 'git@git.int.ybm100.com: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,
}
…………
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容