error: 'Flutter/Flutter.h' file not found when flutter run on iOS

222.4k views Asked by At

I don't know why but I can't build or run the App in my new Macbook, I run the same folder on another Mac or my windows computer and runs perfectly. here when I run flutter clean, I have to run pub get to solve the issues, Is that normal?

If I create a new project, I can run flutter run normally, so I think that maybe there I think it may be related to plugins.

Do you know how can I solve this? Thanks

Flutter Doctor
[✓] Flutter (Channel master, 1.24.0-8.0.pre.343, on macOS 11.0.1 20B29 darwin-x64, locale es-419)
    • Flutter version 1.24.0-8.0.pre.343 at /Users/leo/tools/flutter
    • Framework revision cf6c33e58a (2 days ago), 2020-11-21 14:04:01 -0800
    • Engine revision 23a8e027db
    • Dart version 2.12.0 (build 2.12.0-62.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/leo/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (2 available)
    • sdk gphone x86 arm (mobile) • emulator-5554                        • android-x86 • Android 11 (API
      30) (emulator)
    • iPhone 12 Pro Max (mobile)  • F768139D-7B87-4D9E-93B8-14C7D63786B0 • ios         •
      com.apple.CoreSimulator.SimRuntime.iOS-14-2 (simulator)

• No issues found!




Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...                                                  
Xcode build done.                                           11.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/vibration-umbrella.h"
            ^
    /Users/leo/Apps/previate_esta/ios/Pods/Target Support Files/vibration/vibration-umbrella.h:13:9: note:
    in file included from /Users/leo/Apps/previate_esta/ios/Pods/Target Support
    Files/vibration/vibration-umbrella.h:13:
    #import "VibrationPlugin.h"
            ^
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/vibration-1.4.0/ios/Classes/VibrationPlugin.h:1:9: error:
    'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^
    <unknown>:0: error: could not build Objective-C module 'vibration'
    In file included from
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.3/ios/Classes/FLTURLLauncherPlugin.m:7:
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.3/ios/Classes/FLTURLLauncherPlugin.h:5:9
    : fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.10/ios/Classes/FLTSharedPreference
    sPlugin.m:5:
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.10/ios/Classes/FLTSharedPreference
    sPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/share-0.6.5/ios/Classes/FLTSharePlugin.m:5:
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/share-0.6.5/ios/Classes/FLTSharePlugin.h:5:9: fatal
    error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/sensors-0.4.2+4/ios/Classes/FLTSensorsPlugin.m:5:
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/sensors-0.4.2+4/ios/Classes/FLTSensorsPlugin.h:5:9: fatal
    error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
37

There are 37 answers

17
Raffaelli L.C. On BEST ANSWER

I found a solution!

  1. Backup ios/Runner folder.

  2. Delete the ios folder.

  3. Run flutter create (your project name). in the previous folder where you have your project(cd users/user/"projects_folder") (this will recreate your ios folder).

  4. Paste your Runner backup in the ios folder (into the project).

  5. Open Runner.xcworkspace (into ios folder) and there, check the Version, the Bundle ID, all the info.

  6. (If do you Have Firebase, you have to copy and paste again the Google Service-Info.Plist into the Runner folder (Always through Xcode) (If do you do this manually, it doesn't work).

Finally, flutter run and should work!

If flutter run fails:

  1. cd ios
  2. pod install
  3. cd ..
  4. flutter run
1
Chanaka Weerasinghe On

In My case i have fix the issue

Runner -->Build phases--->Untick for install only enter image description here

0
acoder On

Deleted these files, and recrete as @Raffaelli L.C. answered. flutter run command worked now enter image description here

2
asterisk12 On

Something that worked for me:

Some of the dependencies in my pubspec were outdated (specifically I was using crashalytics 1.0.0 with Flutter 2.0.5, which are incompatible and thus throwing this error).

Upgrading crashalytics to 2.0.0 fixed it for me.

I would look into whatever package is throwing this error, and see if any upgrades are available. If that does not work, try downgrading your flutter version.

1
Ahmed Amr On

the solution is to
1 - change your flutter sdk location and make sure that your flutter sdk new location doesnot have any space char
2 - delete your pods
3 - flutter clean
4 - flutter pub get
5 - cd ios
6 - pod install
7 - flutter run

3
Mostafa A. El-Hakak On

Use this commend in your terminal:

flutter pub cache repair
0
Lutti Coelho On

I'd a similar problem, in my case I wasn't able to build my project even using command line or using xCode, but when I ran pod install --verbose I realize that there was an specific error during pod install

undefined method `each_child' for #Dir:0x00007ff10befa7f0 Did you mean? each_slice

Looking for this specific error I found this answer and I realize that I was using ruby 2.5 and one file generated by Flutter for iOS devices was trying to use a method that was introduced on version 2.6.

After follow the steps on that answer I could run my Flutter app on iOS simulator.

The method dir.each_child was introduced in Ruby 2.6, but you are using Ruby 2.3.0.

You should update Ruby to 2.6.0 or later 2.x version.

After Ruby updating you may also need to restart your IDE and re-install cocoapods.

1
Dhaval Kansara On

I tried all the above solutions and but I ended up re-creating the ios directory.

rm -rf ios
flutter create -i swift .

Note: by performing the above steps will lose all native ios setup. In my case I was getting this error in the demo project I did this.

0
Ilya Maximencko On

If you ever changed build phases scripts in xcode, verify that Run script(/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build) is before Compile Sources enter image description here

1
kokoko On

here is how i solved the problem:

  1. run on your terminal flutter packages upgrade
  2. create a backup of your 'iOS' folder on the project.
  3. delete your 'iOS' folder from your project.
  4. run flutter clean
  5. run flutter pub get
  6. run flutter create . on your root project directory
  7. This will create an 'ios' folder in the repo. Copy the Info.plist, Podfile and any other config files like GoogleServices.plist from the backup 'ios' folder to the newly created 'ios' folder.

try to run your project again. it should work now:)

2
Kashif Ahmad On

Give full access to your Xcode from mac System Settings -> Privacy & Security -> Full Disk Access and from the app list turn on Xcode toggle button. enter image description here

1
davejlin On
In file included from /Users/user/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-0.4.0+1/ios/Classes/FLTFirebaseCrashlyticsPlugin.m:5:
/Users/user/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-0.4.0+1/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:8:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
        ^~~~~~~~~~~~~~~~~~~
While building module 'firebase_core' imported from /Users/user/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-0.4.0+1/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:
In file included from <module-includes>:1:
In file included from /Users/user/Documents/Projects/Vorso-Maui/flutter/vorso_maui/ios/Pods/Target Support Files/firebase_core/firebase_core-umbrella.h:13:
/Users/user/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebaseCorePlugin.h:8:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
        ^~~~~~~~~~~~~~~~~~~
1 error generated.
2 errors generated.

As mentioned by other responses here, Firebase Crashlytics caused this error for me, due to [firebase_crashlytics] 'Flutter/Flutter.h' file not found #5440

The version of the last legacy release of Firebase Crashlytics was 0.4.0+1, which did not include the fix. The fix was included in a later null-safe version (v2.0.0).

However, when I tried to use versions v2+ in which the bug had been fixed, I got trapped in dependency hell - unresolvable conflicts between dependencies / sub-dependencies.

So, I created a fork (firebase_crashlytics_legacy) to provide the fix in a legacy compatible version.

This forked version is 0.4.0+x for consistency.

Hopefully it helps make it easy for others to use the legacy version with this bug fixed.

0
Eray Hamurlu On

1-Run flutter create (your project name). in the previous folder where you have your project(cd users/user/"projects_folder") (this will recreate your ios folder).

2-uncomment #platform :ios, '9.0' in the Podfile - i set that '10.0'

3-pod repo update

4-pod install

0
Saumil Shah On

Change inside Podfile

#platform :ios, '9.0'

Uncomment this line to define a global platform for your project in the Podfile

platform :ios, '13.0'

Tested in VSCode ✅ It will save your 3 hours.

0
Huy Tower On

The reason might be Podfile conflict. (ex. in case : after merge source code .v.v.)

It is easy way, re-install Pod file.

To completely clean (Removing all points to links) and create upgraded to the new (uninstall and installing again too),

Write following command :

flutter clean

rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

Then for reproduce Podfile follow this command

rm ios/Podfile

Finally your project is ready to good to go

flutter run
0
nđq On

I think the case and solution would be varied but try and fail each case on this post is sometimes still helpful. My case:

Repair pub cache

flutter pub cache repair

Run your project, this should show if any dependency those the pod obsolete with

flutter run

Get rid of your flutter build

flutter clean

rm ios/Podfile

Update the pod

pod repo update

Run your project again and hope it works out

flutter run
0
user3305074 On

I got it solved by Adding arm64 for Excluded Architectures in pods & main target.

1
Rachit Rawat On

Downgrade flutter to 1.22.6 (any version below 2.0.0)

Option 1

flutter downgrade v1.22.6

After this, run any Flutter command (such as flutter doctor), and Flutter will take care of downloading/compiling everything required to run this version.

Option 2

You can also download other versions of Flutter SDK from here

0
SePröbläm On

Yet another approach...

If you stumble across this issue in a Flutter project that uses Firebase, and non of the above steps worked, try the following:

  1. Backup your project (just in case).
  2. Delete the whole ios folder insider your Flutter project.
  3. Call flutter create <projectname> at the parent folder of your flutter project (i.e. one folder above). This will recreate the ios folder.
  4. Move the GoogleService-Info.plist file to your project in Xcode.
  5. Now to the important part: When you follow the instructions at Firebase console under "Add firebase to your iOS app", skip step 3 (Add Firebase SDK) and skip step 4 (Add initialization code). In other words: Don't call pod init and don't call pod install. Also keep the AppDelegate unchanged! Instead simply call flutter run, which handles setting up the pods.
  6. In ios/Podfile: Uncomment the line platform :ios, '8' and set the iOS version (12.1 seems to be a good fit at the time of writing). Set the same version in Xcode at PROJECT -> Runner -> Deployment Target -> iOS Deployment Target and (also in Xcode) under TARGETS -> Runner -> Deployment Info.
  7. Call flutter clean and flutter run

With a little luck you've got it back running.

1
Harsh Phoujdar On

I was stuck at this error message for months ! After a lot of trial and errors I finally, finally got it working and these were the steps I followed.

  1. Go to your project folder, delete the ios folder in the project
  2. Create a new project by running flutter create . This step actually did not work for me because my project name was CamelCase, and maybe a recent update for Flutter did not allow this as the project name. I had to change the project name throughout the project before I ran this command.
  3. Step 2 actually created a new project inside my existing one, but don't worry about that, all you require is the ios folder from that.
  4. Copy-paste this ios folder into your project folder and delete the newly created project folder, you don't need this anymore (I am sure there is a better way to do this).
  5. Flutter run gave me a Could not locate configuration file: 'GoogleService-Info.plist' error, this was easily solved by getting the latest GooglService file from Firebase and adding in through X-code.
  6. Then flutter run, ran on my physical device and voila !
0
Abir Ahsan On

delete the following in your ios folder:

# Flutter/Flutter.podspec file

# Pods folder

# Podfile.lock file

go to your ios folder (cd ios), execute the following command:

pod install --repo-update

back to you project folder and run

flutter clean

flutter run
5
Mr. Ripper On

Solution 1

  1. Back up the Runner folder in your ios folder to a safe place.

  2. Delete the ios folder:

enter image description here

  1. Still in the root directory, run the following command( including the space and period):

flutter create .

A new ios folder will be generated inside your project.

  1. Copy and paste the Runner folder you have backed up before to the new ios folder:

enter image description here

A dialog will appear. Click on the Replace button to continue.

  1. If your project is NOT using Firebase, you can ignore this step and move on to the next one. Otherwise, you need to re-add the GoogleService-Info.plist file by opening the ios folder with Xcode, right-click on Runner, choose Add Files to “Runner” from the drop-down menu, then select the GoogleService-Info.plist file that is associated with your project.

enter image description here

  1. Navigate to your ios folder and run:

pod install

You may fall into something like this:

enter image description here

# Uncomment this line to define a global platform for your project platform :ios, '11.0'

Now run pod install again, and it should work (a few warnings may appear, but we don’t care about them).

  1. Finally, go back to your root directory and run your project as normal (don’t forget to launch an iOS simulator first):

cd .. flutter run

If you still get errors, clear the Flutter’s build cache by executing this:

flutter clean

And update dependencies in .pub-cache:

flutter pub cache repair

Then run your project again.

Solution 2

Occasionally, the error is caused by a simple reason: you are currently on the Master channel instead of the Stable channel. According to the Flutter wiki:

Master channel: The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes things accidentally break. Stable channel: This channel is strongly recommend to use for all production app releases. What you need to do now is to switch to the stable channel:

flutter channel stable

Then:

flutter clean

Finally:

flutter run

Solution 3

You could try this if the two approaches above didn’t solve the problem.

  1. Go to /ios folder and delete the following:

Flutter/Flutter.podspec file Pods folder Podfile.lock file

  1. Still in the ios folder, execute the following command:

pod install --repo-update

  1. Navigate to the root directory of your project and clean your project by running this command:

flutter clean

  1. Run it:

flutter run

Hope this helps... Credit: A Goodman

2
Michał Dobi Dobrzański On

It might happen that particular iOS POD depedency does not have Flutter dependency.

In my case it was firebase_crashlytics: ^1.0.0

Unfortunately it is up to maintainer to provide working solution. You might remove cached version located at:

/Users/user/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/firebase_crashlytics.podspec

Please visit this issue for reference.

The .podspec for particular 3rd party lib should have:

s.dependency 'Flutter'

in

Pod::Spec.new do |s|
   ...

Then, invoke pod install in ios directory, to reflect the change.

Lastly, schedule your build.

7
p0wl On

This solution worked for me:

Changing PodFile from:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
    config.build_settings['ENABLE_BITCODE'] = 'NO'
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
    end
  end
end

to

post_install do |installer|
  installer.pods_project.targets.each do |target| 
    flutter_additional_ios_build_settings(target)
  end
end
1
Edgar Froes On

Edit: a new version of Crashlytics has just been release for Flutter 2. Just upgrade your pubspec.yml:

firebase_crashlytics: ^2.0.0

Below is my old answear.

For Flutter 2, you can follow the instructions in this GitHub comment. Text pasted below:

Workaround for Flutter 2.0.4 is to use firebase_crashlytics from git instead of pub.dev. This seems to work (ref to the currently latest commit):

  firebase_crashlytics:
    git:
      url: git://github.com/FirebaseExtended/flutterfire.git
      path: packages/firebase_crashlytics/firebase_crashlytics
      ref: 200b8ca8f1c452e4249fb791e53cc55e786ac768
0
umutckmk On

This error is due to not using the appropriate flutter version. Your packages are written in old flutter version. You can update packages to latest versions or you can revert to the flutter version appropriate for the packages you use in your project.

1
Kshitiz Goel On

I hit my head for 3 days with this error. In my case, This error was happening due to a plugin : webview_flutter.

This is how approached to this problem:

1.) remove that plugin from pubspec.yaml

2.) cd ios

3.) pod deintegrate

4.) again add that plugin in pubspec.yaml

5.) flutter clean

6.) flutter pub get

7.) cd iOS

8.) pod install

This should work! It worked in my project.

0
dokind On

I found a simple solution. just in case save backup :)

  1. rm -rf ios
  2. flutter create -i swift .

That's it.

6
Andrey Gordeev On

A way easier solution:

  1. Remove ios/Flutter/Flutter.podspec: rm ios/Flutter/Flutter.podspec
  2. flutter clean
  3. Run your app again.

Taken from here

0
pi2 On

If you only encounter this problem when running "flutter build ipa", in XCode make sure your Deployment Info under Runner and Pods matches the 'platform' in ios/Podfile.

Podfile

Runner

0
Rem-D On

A really simple solution that worked for me was simply: close the xcode project. Then, on Android Studio, build the iOS archive by going to Build -> Flutter -> Build iOS. Then reopen the xcode project and it built and ran fine.

0
D.A.C. Nupun On

This happened me too. After follow below steps problem sorted for me !

  1. Back up the Runner folder in your ios folder to a safe place.
  2. Delete the ios folder:
  3. Go to the root directory, run the following command:

flutter create .

  1. After above step, will create ios folder. Copy and paste the Runner folder you have backed up before to the new ios folder:
  2. Run the project in android studio or VS code
  3. Navigate to your ios folder and run:

pod install

  1. ios > Runner.xcworkspace right click and Flutter > Open iOS module in xCode enter image description here

It will work :)

0
Jasmin Sojitra On
  1. Copy info.plist, Assets.xcassets and other important files.
  2. Create a New project with same name and bundle id.
  3. Add an iOS project in your old project and add 1st step information in that.
  4. Run project. It's working now.
0
Priyank Patel On

You have to make changes in your ios folder Podfile as per below code :

# Uncomment this line to define a global platform for your project
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
  raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
  matches = line.match(/FLUTTER_ROOT\=(.*)/)
  return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target) // This error occurred if this line is missing in Podfile
  end
end

After above change, run below commands in terminal :

flutter clean
flutter pub get
flutter run
0
Marko Marinkovic On

For me it helped to update my podfile to the following :

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
         end
    end
end
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

credit to https://stackoverflow.com/a/75899204/16966471

0
Matthew Rideout On

If Flutter permission_handler Related

If you've just integrated permission_handler for flutter into your app, and followed instructions to modify the ios podfile to add needed permissions, you may encounter this error using the provided instructions.

I started receiving the fatal error: 'Flutter/Flutter.h' file not found error after modifying the podfile.

Solution

The solution is to change the way the podfile modification is made so that flutter_additional_ios_build_settings(target) is properly and included, with proper nesting for the target.build_configurations.each... array.

Example Podfile Modification

post_install do |installer|
  installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
        target.build_configurations.each do |config|
            # You can enable the permissions needed here. For example to enable camera
            # permission, just remove the `#` character in front so it looks like this:
            #
            # ## dart: PermissionGroup.camera
            # 'PERMISSION_CAMERA=1'
            #
            # When enabled here, corresponding metadata should be added to info.plist
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
                '$(inherited)',

                ## dart: PermissionGroup.calendar
                # 'PERMISSION_EVENTS=1',

                ## dart: PermissionGroup.reminders
                # 'PERMISSION_REMINDERS=1',

                ## dart: PermissionGroup.contacts
                # 'PERMISSION_CONTACTS=1',

                ## dart: PermissionGroup.camera
                # 'PERMISSION_CAMERA=1',

                ## dart: PermissionGroup.microphone
                # 'PERMISSION_MICROPHONE=1',

                ## dart: PermissionGroup.speech
                # 'PERMISSION_SPEECH_RECOGNIZER=1',

                ## dart: PermissionGroup.photos
                # 'PERMISSION_PHOTOS=1',

                ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
                # 'PERMISSION_LOCATION=1',

                ## dart: PermissionGroup.notification
                # 'PERMISSION_NOTIFICATIONS=1',

                ## dart: PermissionGroup.mediaLibrary
                # 'PERMISSION_MEDIA_LIBRARY=1',

                ## dart: PermissionGroup.sensors
                # 'PERMISSION_SENSORS=1',

                ## dart: PermissionGroup.bluetooth
                # 'PERMISSION_BLUETOOTH=1',

                ## dart: PermissionGroup.appTrackingTransparency
                # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',

                ## dart: PermissionGroup.criticalAlerts
                # 'PERMISSION_CRITICAL_ALERTS=1'
            ]
        end
    end
end
0
akshaya M On

Flutter version on my mac was higher than the flutter version where I coded the application on… So I just downgraded my flutter to the version I coded on And tada Error resolved Make sure you are on the same version of flutter as the laptop you coded on In my case I coded it on old version of flutter on my windows laptop and tired to run on latest version of flutter so the error popped up. If this is your case then go through the below link - Flutter simulator error: Command PhaseScriptExecution failed with a nonzero exit code