pod 安装错误:给定 podspec 'file_picker' 的名称与预期的 'gx_file_picker'

问题描述

我在执行 pod install 时遇到以下错误

[!] The name of the given podspec 'file_picker' doesn't match the expected one 'gx_file_picker'

我尝试将“pubspec.yaml”中的文件名从 gx_file_picker 更改为 file_picker,但这似乎不起作用。进一步的研究也没有成效。

知道如何解决这个问题吗?

解决方法

我遇到了同样的问题,我发现 gx_file_picker/ios/gx_filepicker.podspec:

  s.name             = 'file_picker'

必须改为:

  s.name             = 'gx_file_picker'

更改后这样做不会造成任何伤害:

  1. 进入ios文件夹
  2. 删除 PodFile.lock 文件
  3. rm -rf Pods
  4. pod 缓存清理 --all
  5. 吊舱解体
  6. 吊舱设置
  7. pod 安装

现在我的项目一切正常。