2
votes

When I ran flutter run command this error appeared.

I am trying to use a map_view.

My Xcode version is 9.2

In file included from

/Users/rsaivenkatesh/.pub-cache/hosted/pub.dartlang.org/map_view-0.0.10/ios/Classes/MapViewPlugin.m:1: /Users/rsaivenkatesh/.pub-cache/hosted/pub.dartlang.org/map_view-0.0.10/ios/Classes/MapViewPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found #import

1 error generated. Could not build the application for the simulator. Error launching application on iPhone X.

2
I think you should upgrade to a newer Flutter version flutter channel dev flutter doctor flutter update-packages --force-upgrade - Günter Zöchbauer
@Günter Zöchbauer No I am still getting the same error .This happens only if I add the dependency map_view 0.0.10. - sai venkatesh

2 Answers

2
votes

I had a similar problem trying to include the audioplayer package

audioplayer-0.4.0/ios/Classes/AudioplayerPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found

I thought I was up-to-date, but after I did a Flutter upgrade and then deleted Podfile, Podfile.lock and the Pods folder from my ios directory under my project (and ran flutter clean), I was finally able to build and launch to iOS. See https://github.com/flutter/flutter/pull/16273

I'm using Xcode 9.3 and Cocoapods 1.5.0 Flutter shows version 0.3.1 after upgrading.

0
votes

Perhaps you need to flutter pub upgrade to make sure you have the latest dependencies.