플러터 개발환경 설정
1. 플러터 다운로드 및 압축풀기
https://docs.flutter.dev/get-started/install
Install
Install Flutter and get started. Downloads available for Windows, macOS, Linux, and ChromeOS operating systems.
docs.flutter.dev
설치당시 최신버전 3.13.8
2. 안드로이드 스튜디오설치
- SDK에서 command line tool 설치
- plugin 에서 fultter 설치
3. git 설치
path 에 git 추가 : 요즘은 설치시 자동 추가
C:\Program Files\Git\cmd
3. 환경변수 등록
path 에 flutter/bin 폴더 추가
4. 파워쉘에서 확인
파워쉘에서 flutter doctor 명령어 실행시 해당 에러발생
Error: Unable to find git in your PATH.
파워쉘 권한변경
관리자모드 진입후
Set-ExecutionPolicy Unrestricted
git config --global --add safe.directory '*'
두개 명령어 친후 해결됨
최신버전 적용을위해
flutter doctor
flutter upgrade
진행
5. analytics설정
flutter config --no-analytics
6. 안드로이드 설정
USB디버깅을 위해 SDK에서 Google USB Driver 설치
https://developer.android.com/studio/run/win-usb
Google USB 드라이버 가져오기 | Android 스튜디오 | Android Developers
Google 기기를 사용하는 Windows에서 adb 디버깅을 실행하려면 Google USB 드라이버가 필요합니다.
developer.android.com
임시 테스트용으로는 에뮬레이터를 사용하며 안드로이드 라이센스에 동의함
flutter doctor --android-licenses
---
추가사항 : flutter doctor시 다운로드 하라고나옴
https://visualstudio.microsoft.com/downloads/
Download Visual Studio Tools - Install Free for Windows, Mac, Linux
Download Visual Studio IDE or VS Code for free. Try out Visual Studio Professional or Enterprise editions on Windows, Mac.
visualstudio.microsoft.com
Dart 설치
환경변수 경로변경
ProgramData폴더 삭제후 진행
choco install dart-sdk
설치후 Dart가 c:\tools에 설치된걸 확인가능하다
choco upgrade dart-sdk
환경변수에 dart-sdk 추가
안드로이드에서 플러터 테스트
New Flutter Project 선택후 프로젝트 생성