pod install error: The name of the given podspec 'file_picker' doesn't match the expected one 'gx_file_picker'

252

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.

Share:
252
ayez1389
Author by

ayez1389

Updated on December 29, 2022

Comments

  • ayez1389
    ayez1389 over 1 year

    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?

  • Biruk Telelew
    Biruk Telelew almost 3 years
    the file is returned back to file_picker after I run pod install then same error happened
  • Daniel
    Daniel almost 3 years
    Change again then.
  • Biruk Telelew
    Biruk Telelew almost 3 years
    i did that many times but still the same.
  • Daniel
    Daniel almost 3 years
    But if you change the param i mention, and just start the app, do it works? Because it does in my actual project.
  • ayez1389
    ayez1389 almost 3 years
    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
    ayez1389 almost 3 years
    @birukIS did you follow the other steps listed below which include clearing pod cache. I think that is the issue.