본문 바로가기
Flutter/Flutter FAQ

VSCode는 Flutter SDK의 경로를 찾을 수 없습니다., VSCode Can't Find the PATH To the Flutter SDK

by 베타코드 2024. 1. 3.
반응형

질문


I just tried to execute Flutter: New Project, but it shows an error that could not find a flutter SDK. I've ensured to complete all of the requirements from the flutter doctor.

enter image description here

enter image description here

Is there any way to solve this problem?

Thanks.


답변


macOS에서는 다음 단계를 따라 해결할 수 있습니다.

먼저 플러터 SDK를 다운로드 한 위치를 찾으세요. (여기에서 다운로드 할 수 있습니다). 다운로드 폴더에 있을 것입니다. 그렇지 않은 경우 다른 위치를 선택한 것입니다.

다음:

  1. 터미널을 엽니다. 다음 명령을 실행하세요: sudo nano /etc/paths
  2. 비밀번호를 입력하세요.
  3. 파일의 맨 아래로 이동하여 추가하려는 경로를 입력하세요.
  4. control-x를 눌러 종료하세요.
  5. 수정된 버퍼를 저장하려면 "Y"를 입력하세요.

SDK가 Downloads 폴더에 다운로드되었다면 추가할 경로/Users/사용자이름/Downloads/flutter/bin이어야 합니다.

마지막으로, 터미널 창과 VS Code를 종료하고 다시 시작하세요. 재시작 후, 두 앱 모두 flutter를 인식하고 flutter doctor를 실행할 수 있어야 합니다.

반응형

댓글