명령줄로 dart, fvm, flutter 설치 및 삭제(fvm 비추천)
오랜만에 flutter를 사용해볼 일이 생겨서 설치함.
- Chocolatey 설치 (PowerShell 관리자 권한):
1
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- Dart 설치:
1
choco install dart-sdk
- FVM 설치
1
dart pub global activate fvm
- Flutter 프로젝트 디렉토리로 이동 후 Flutter 설치
1
2
3
4
5
6
cd 프로젝트
fvm install stable
fvm use stable
fvm flutter pub get
fvm flutter run -d windows
- 문제 있을 시
1
fvm flutter doctor
- 안드로이드 스튜디오 설치 필수 https://docs.flutter.dev/platform-integration/android/setup
Set up Android development Configure your development environment to run, build, and deploy Flutter apps for Android devices. Configure your development environment to run, build, and deploy Flutter apps for Android devices.
- Visual studio 설치 필수 https://visualstudio.microsoft.com/ko/downloads/
Windows, Mac, Linux용 Visual Studio 및 VS Code 다운로드 Visual Studio IDE 또는 VS Code를 무료로 다운로드하세요. Windows 또는 Mac에서 Visual Studio Professional 또는 Enterprise Edition을 사용해 보세요. Visual Studio IDE 또는 VS Code를 무료로 다운로드하세요. Windows 또는 Mac에서 Visual Studio Professional 또는 Enterprise Edition을 사용해 보세요.
- fvm 삭제
1
dart pub global deactivate fvm
FVM 관련 폴더 삭제
- 프로젝트 내 .fvm 폴더 삭제:
- 프로젝트 루트 폴더에 있는 .fvm 폴더를 수동으로 삭제하세요.
- 사용자 폴더 내 FVM 설정 삭제:
- C:\Users\사용자이름.fvm 폴더가 있다면 삭제하세요. 삭제가 안된다면 https://blog.naver.com/devramyun/224073511734 을 참조.
[20251112] 파일이 잠겨있어서 삭제하지 못할 때 unlock LockHunter는 잠긴 파일을 찾아 어떤 프로세스가 사용하는지 보여주… LockHunter는 잠긴 파일을 찾아 어떤 프로세스가 사용하는지 보여주…
환경 변수에서 FVM 경로 제거 FVM을 사용하면서 PATH 환경 변수에 추가한 경로가 있다면 제거해야 합니다:
- 시작 메뉴 → “환경 변수” 검색 → “시스템 환경 변수 편집” 클릭
- 환경 변수(N)… 클릭
- 사용자 변수 또는 시스템 변수에서 Path 선택 → 편집
- C:\Users\사용자이름\AppData\Local\Pub\Cache\bin 또는 FVM 관련 경로가 있다면 삭제
- 확인 → 확인 → 적용
캐시 정리 (선택 사항) FVM 관련 캐시를 정리하고 싶다면 다음 경로도 삭제할 수 있습니다:
- C:\Users\사용자이름\AppData\Local\Pub\Cache