Can't build a flutter project with PathProvider dependency Can't build a flutter project with PathProvider dependency dart dart

Can't build a flutter project with PathProvider dependency


This issue should be fixed by https://github.com/flutter/flutter/pull/15437

To apply the fix to an existing project, add these lines to ios/Podfile.


I finally find a workaround.

I went to the GitHub repo, found the PathProviderPlugin.h file, and put it inside the location:

build/ios/Debug-iphonesimulator/path_provider/path_provider.framework/Headers/

Sounds a little bit dirty, but was the only way to keep coding.

Hope helps someone. And thanks to @GünterZöchbauer to help me find a useful lead.


  1. Open the project in xcode. i.e On Android Studio, right click -> Flutter -> open in xcode.
  2. Find the PathProviderPlugin.h file. (Find -> Find in workspace -> 3. PathProviderPlugin.h)
  3. Click on the result. In case you cannot find the result, right click on the PathProviderPlugin.m file and choose 'Reveal In Project Navigator'
  4. There you will see PathProviderPlugin.h file.
  5. On right hand side, target membership, change the settings from project to public.
  6. Do this for any files for which compiler is complaining, till you are able to build your project.

    Check the image for reference. Use the highlighted button to open right hand panel (Added For Android devs who don't know much of xcode. :) )