Flutter
[Flutter] Unable to locate Android SDK.
LeeeGi
2024. 2. 25. 01:17
반응형
플러터 설치 후 오류
flutter doctor 를 실행했더니 아래와 같은 오류가 발생한다.
[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.
`flutter config --android-sdk` 를 해보라고 하니 시도해 봤다.
Missing argument for "android-sdk".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
찾아보니 `flutter config android-sdk` 를 시도해보라고 해서 해봤더니
error: flutter config: Too many arguments.
If a value has a space in it, enclose in quotes on the command line
to make a single argument. For example:
flutter config --android-studio-dir "/opt/Android Studio"
안된다.

반응형
그럼 아래의 방법을 실행해 보자.
(아래 방법을 시도하기 전에 각자의 Android SDK Path를 알아야 한다. 이 부분은 생략.)
flutter config --android-sdk <Android SDK path>
Setting "android-sdk" value to "C:\Public\Android".
You may need to restart any open editors for them to read new settings.
설정되었다고 하니, doctor를 실행해 보자.
flutter doctor
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc2)
Gooood~

반응형