Flutter simulator error: Command PhaseScriptExecution failed with a nonzero exit code
Asked Answered
M

1

0

I have created a new flutter project on Android studio. When I try to run it on emulator it gives this error:

PhaseScriptExecution failed with a nonzero exit code

When I check the "For install builds only" checkbox in the Target>Build Phases>Run Scripts or when I exclude arm64 architecture, it gives another error

'Flutter/Flutter.h' file not found

I have tried deleting and recreating the ios directory, but no luck.

Flutter doctor and everything works completely fine

Please help me

Thanks in advance

Mouton answered 15/11, 2021 at 16:53 Comment(2)
Is this for an iOS build? I've only come across this error for iOS buildsAssociative
yes @Associative it is for iOS build only,Do you know the solution?Mouton
M
1

SOLVED! 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 not your case then go through the below link - error: 'Flutter/Flutter.h' file not found when flutter run on iOS

Mouton answered 15/11, 2021 at 20:3 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.