2

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?

ayez1389
  • 58
  • 7

2 Answers2

3

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Daniel
  • 1,007
  • 1
  • 11
  • 23
  • the file is returned back to file_picker after I run pod install then same error happened – Biruk Telelew Jul 07 '21 at 09:32
  • Change again then. – Daniel Jul 08 '21 at 05:34
  • i did that many times but still the same. – Biruk Telelew Jul 09 '21 at 07:08
  • But if you change the param i mention, and just start the app, do it works? Because it does in my actual project. – Daniel Jul 09 '21 at 08:55
  • 1
    Just to help out a bit, to find this directory "gx_file_picker/ios/gx_filepicker.podspec:" navigate to your installed Flutter SDK folder in finder, ensure you can view hidden folders and navigate to "flutter/.pub-cache/hosted/pub.dartlang.org/" you would find the the directory there. – ayez1389 Jul 19 '21 at 13:37
  • 1
    @birukIS did you follow the other steps listed below which include clearing pod cache. I think that is the issue. – ayez1389 Jul 19 '21 at 13:38
0

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)
Jiang Wang
  • 273
  • 3
  • 9