[Flutter] flutter setup error, "Unable to locate Android SDK.", "[!] Connected device"

flutter 설치 확인 오류 

오류: "Unable to locate Android SDK." 
C:\>flutter doctor
Unable to locate Android SDK.
 또는
[X] Android toolchain - develop for Android devices
[X] Unable to locate Android SDK


    • 원인 
      • flutter 설치 후 Android SDK 패스를 변경했을 경우 발생
    • 해결
      • Android SDK 경로 재설정
      • 라이센스 동의 재입력
경로 재설정
C:\>flutter config --android-sdk C:\AndroidSDKl
Setting "android-sdk" value to "C:\AndroidSDK".
라이센스 동의 명령어 재입력
C:\Users\neo16>flutter doctor --android-licenses

오류: "[!] Connected device"
  • flutter doctor 실행 했을 때
C:\>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code (version 1.31.1)
[!] Connected device

! Doctor found issues in 1 category.

또는 
  • Android Studio > Tools > Flutter > Flutter doctor 실행 했을 때, 오류 발생
  • 원인
    • Android Studio 설치 후 "AVD Manager"로 Virtual Device 생성 만 하고 해당 Virtual Device에서 개발자 옵션을 활성화 하지 않았을 경우 발생
    • Flutter에서 에뮬레이터 디비이스를 선택 하지 않았을 경우
C:\>flutter devices
No devices detected.
Run 'flutter emulators' to list and start any available device emulators. 
C:\>flutter devices
No devices detected.
Run 'flutter emulators' to list and start any available device emulators.
Or, if you expected your device to be detected, please run "flutter doctor" to diagnose potential issues, or visit
https://flutter.io/setup/ for troubleshooting tips.
• Device emulator-5554 is not authorized.
You might need to check your device for an authorization dialog.
 
  • 선택 가능한 디바이스 확인
C:\>flutter emulators
1 available emulator:
Nexus_5X_API_28 • Nexus 5X • Google • Nexus 5X API 28
To run an emulator, run 'flutter emulators --launch <emulator id>'.
To create a new emulator, run 'flutter emulators --create [--name xyz]'.
You can find more information on managing emulators at the links below:
  https://developer.android.com/studio/run/managing-avds
  https://developer.android.com/studio/command-line/avdmanager


기타 오류
  • flutter 설치 전 AVD Manager을 통해 만들어 둔 virtual device가 있다면 삭제 하고 설치 후 다시 만든다
emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.
Please use -read-only flag to enable this feature.









댓글

이 블로그의 인기 게시물

[유니티] 오류 사례 "Moving file failed", "Temp"

[유니티] 구글 지도 출력 샘플