[X] Android toolchain - Unable to locate Android SDK
문제확인
플러터를 설치 중에 다음과 같은 문제가 생겼다.
[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/sindows#android-setupfor detailed instructions).)
If the Android SDK has been installed to a custom location, please use
'flutter config --android-sdk' to update to that location.
해결 방법
1. 아래의 명령어를 입력해본다.
flutter config --android-sdk
flutter config android-sdk
2. 그래도 안된다면, 욕을 한 후, (F*ck Flutter)
아래의 방법을 실행해본다..
안드로이드 스튜디오 실행
빨간색으로 표시된 More Actions에서 SDK Manager을 클릭한다.
아래와 같은 Settings 화면이 뜬다.
빨간색으로 표시된 Android SDK Location을 복사한다.
cmd 창에 아래와 같은 명령어를 입력한다.
** 작성자의 경우 아래의 주소가 sdk 경로이다.
** flutter config --android-sdk "C:\Users\ysy56\AppData\Local\Android\Sdk"
flutter config --android-sdk <path-to-sdk>
문제 해결 여부 확인
아래와 같이 "Unable to locate Android SDK."의 문제는 해결된 것을 확인할 수 있다.