https://flutter-ko.dev/docs/get-started/install
윈도우 버전으로 다운받기.
압축을 풀고 원하는 위치에 넣기. 기본적으로 'Users\본인계정' 으로 설정되는데, 나의 경우 계정명이 한글이라서 그냥 C드라이브 위치에 두었다.
C:\flutter |
CMD를 열어서 'flutter doctor'를 쳐보면 플러터를 준비하기 위한 체크리스트들이 뜬다.
현재 안드로이드 스튜디오가 없고 문제가 있는 것 같다.
[√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.18363.1500],
locale pl-PL)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup
for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[√] Android Studio
[√] Connected device (1 available)
https://developer.android.com/studio?hl=ko
안드로이드 스튜디오를 설치한다. 위의 경로도 마찬가지로 기본 'Users\계정명' 하위에 설치되는데, 계정명이 한글이라고 애초에 바꾸라고 해서 C에 설치할 것이다. (ASCII가 아니라고 뜬다.)
C:\Android\sdk |
깔기만 한다고 해서 해결되는 문제가 아니다. 아직 인식이 안된다.
1. '시스템 및 환경 변수 편집'에 들어 가서 '사용자 변수'에 '새로 만들기'를 클릭한다. 그 후 변수명을 'ANDROID_HOME'으로 하고 값을 안드로이드 스튜디오를 설치한 위치로 설정해주면 된다.
2. 'Path' 변수를 선택하고 편집을 하자. 두 값을 추가하자.
CMD를 껐다 킨 후 'adb'를 입력해보면 인식이 잘 되는 것을 확인할 수 있다.
이제 CMD에 'flutter doctor --android-licenses'를 입력하고 y를 눌러 다 동의해주면 된다.
또, 안드로이드 스튜디오를 열어서 'More Actions' -> 'SDK Manager'에 들어 간다. 그 후 'SDK Tools'에 들어 가서 'Android SDK Command-line Tools (latest)를 설치하면 모든게 끝난다.
[참고]
https://stackoverflow.com/questions/67947146/flutter-doctor-x-android-toolchain