-
[Flutter] Error: A JNI error has occurred, please check your installation and try again프로그래밍/Flutter 2023. 4. 12. 14:28반응형
Flutter 세팅 중 발생한 오류
PS C:\Users\admin> flutter doctor --android-licenses
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
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" Android sdkmanager tool was found, but failed to run
(C:\Users\admin\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat): "exited code 1".
Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.시스템 환경 변수에서
JAVA_HOME으로 JAVA 11버전 이상이 등록 되어 있는지 확인해야 한다.
반응형'프로그래밍 > Flutter' 카테고리의 다른 글
[Flutter] 오랜만에 다시 시작하는 Flutter (0) 2023.11.08 [Flutter] 어플 등록 플레이스토어에 등록하기2. (0) 2023.05.22 [Flutter] 어플 등록 플레이스토어에 등록하기. (0) 2023.05.07 [Flutter] Flutter 진행 노트 - 1 (0) 2023.04.11 [Flutter] Flutter 환경 설정 (0) 2023.04.09