beaver1234
beaver1234

Reputation: 141

Flutter BUILD FAILED for iOS-for Map View(works for android)

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.

Upvotes: 3

Views: 848

Answers (2)

Jacob Joel
Jacob Joel

Reputation: 136

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.

Upvotes: 2

Randal Schwartz
Randal Schwartz

Reputation: 44141

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

Upvotes: 0

Related Questions