RedMeta

처음 안드로이드 스튜디오를 사용할 때 나타날 수 있는 에러를 해결하는 방법에 대해서 알려드리겠습니다.

 

저는 맥북에서 플러터를 안드로이드 스튜디오를 통해서 사용하려고 프로젝트를 시작했을 때 발생한 로그입니다.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

 

flutter doctor 를 실행했을 때 위와 같은 로그가 발생했는데 해결방법은 정말 간단합니다.

 

$ xcode-select --install

명령어를 터미널에 입력해 주시면 됩니다.

 

만약 XCode가 설치되어 있지 않으셨다면 먼저 설치하시는 것을 추천드립니다.

앱스토어에서 다운받으실 수 있습니다.

https://apps.apple.com/kr/app/xcode/id497799835?mt=12 

 

‎Xcode

‎Xcode includes everything developers need to create great applications for Mac, iPhone, iPad, Apple TV, and Apple Watch. Xcode provides developers a unified workflow for user interface design, coding, testing, and debugging. The Xcode IDE combined with

apps.apple.com

 

위에 xcode select 명령어를 실행하게 되면 아래와 같이 한참 소프트웨어 설치 중을 진행한 후 완료되는 것을 확인하실 수 있습니다.

소프트웨어 설치 중

그리고 나서 다시 에러로그가 뜨는 상황을 다시 재현해 보시면 깔끔하게 해결되는 것을 볼 수 있습니다.

 

도움이 되셨다면 댓글로 남겨주세요

공유하기

facebook twitter kakaoTalk kakaostory naver band