I'm getting the following error while doing pod install.

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

I have tried changing the name of the file in 'pubspec.yaml' from gx_file_picker to file_picker but that doesn't seem to work. Further research has not been productive either.

Any idea how to solve this?

2

There are 2 answers

6
Daniel On BEST ANSWER

I been facing the same problem, what I found is that gx_file_picker/ios/gx_filepicker.podspec:

  s.name             = 'file_picker'

must be changed to:

  s.name             = 'gx_file_picker'

And woudn't do any harm to do this after the change:

  1. go into ios folder
  2. delete the PodFile.lock file
  3. rm -rf Pods
  4. pod cache clean --all
  5. pod deintegrate
  6. pod setup
  7. pod install

Now everything works in my project.

0
Jiang Wang On

I had the same issue. Couldn't resolve this by cleaning Pod's cache. This issue seemingly has connection with pod, but these plugin pods are there because of "flutter pub". I managed to solve this issue by using the following command:

  1. flutter pub cache clean
  2. flutter pub get
  3. pod install (in .ios folder)