안드로이드 스튜디오를 사용해서 flutter 작업을 한다.
집에 와서 작업을 하려고 안드로이드 스튜디오를 열었는데
에뮬을 켜도 에뮬이 보이지 않고 no device만 출력되었다.
flutter doctor를 입력해서 문제를 해결하려고 했다.
처음에는 flutter path 설정도 안해두어서 flutter doctor 입력도 안되었다
flutter path 설정을 해준 후 다시 입력하니
안드로이드 스튜디오가 설치되어있음에도 불구하고 아래와 같은 오류가 발생했다.
[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, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
Android SDK를 설치할때 용량 문제로 기본 경로가 아닌 사용자 경로로 설치했던게 문제였다.
ANDROID_SDK_ROOT 환경변수 설정을 해주자
사용자 변수에 ANDROID_SDK_ROOT 를 추가하고 sdk를 설치한 경로를 넣어주면 된다.
변수를 설정하고 flutter doctor를 실행하니
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.18363.1139], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[√] Android Studio (version 4.0)
[!] Connected device
! No devices available
오케이 되었다
안드로이드 스튜디오를 껐다 키니 문제 해결