Search code examples
flutterdartflutter-dependenciesflutter-packagespod-install

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


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?


Solution

  • 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.