Flutter doctor에서 flutter doctor --android-licenses UnsupportedClassVersionError 발생하는 경우
flutter doctor --android-licenses
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
아침부터 삽질을 했다.
우선 Android SDK Command-line Tools가 설치되어 있는지 확인한다.
난 근데 안되더라...?
알고보니... 바보 멍청이 짓을 하고 있었더라...
나는 멍청하게 jre를 받아놓고 jdk로 확인한 것...
java 경로에 들어가 혹시 나와 같은 멍청한 짓을 하고 있었는지 확인하자.
(버전은 최신 버전을 추천하는듯 함)
┌─ Flutter Fix ─────────────────────────────────────────────────────────────────┐
│ [!] You need Java 11 or higher to build your app with this version of Gradle. │
│ │
│ To get Java 11, update to the latest version of Android Studio on │
│ https://developer.android.com/studio/install. │
│ │
│ To check the Java version used by Flutter, run `flutter doctor -v`. │
└───────────────────────────────────────────────────────────────────────────────┘
https://seokbong.tistory.com/136
Java JDK 다운로드 및 경로 확인
JDK 설치를 하지 않은 경우 아래 링크에서 다운로드 하자. // 8버전 https://www.oracle.com/java/technologies/downloads/#java8 Download the Latest Java LTS Free Subscribe to Java SE and get the most comprehensive Java support available, w
seokbong.tistory.com
https://seokbong.tistory.com/137
Java 환경변수 설정 (Windows)
1. 시작(윈도우) 키를 누르고 "환경 변수" 입력, "시스템 환경 변수 편집" 클릭 2. "환경 변수(N)..." 클릭 3. 시스템 변수(S)의 "새로 만들기(W)..." 클릭, 변수 이름 : JAVA_HOME 변수 값 : 본인 JDK 폴더 경로
seokbong.tistory.com