본문 바로가기

Flutter

[Error] IOS시뮬레이터가 갑자기 안될때

https://stackoverflow.com/questions/63336927/how-to-fix-command-phasescriptexecution-failed-with-a-nonzero-exit-code-on-flutt

 

How to fix Command PhaseScriptExecution failed with a nonzero exit code on flutter run in macOS?

I am working on a flutter app. I recently shifted to macOS and since then haven't been able to run the app. Other apps are running fine so I think the error is in within the code of this app. And m...

stackoverflow.com

 

에러메세지

Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order

 

갑자기 IOS시뮬레이터가 먹통이되었다.

IOS폴더에 가보면 Podfile 과 Podfile.lock

이 있는데 두 파일에 설정된 버전이 달라서 그렇다고 한다.

flutter clean
flutter pub get
flutter pub upgrade
cd iOS
pod install

 

하면 누가범인인지알수있다.

 

해결방법

  1. IOS/podfile.lock 삭제
  2. 터미널에서 cd ios, pod install
  3. flutter clean
  4. flutter run