3
respostas

erro ao aceitar licensa

C:\Users\W10>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, 3.3.0-0.1.pre, on Microsoft Windows [versÆo 10.0.17763.107], locale pt-BR) [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) X Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/windows#android-setup for more details. [√] Chrome - develop for the web [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2021.1) [√] VS Code (version 1.86.2) [√] Connected device (2 available) [√] HTTP Host Availability

! Doctor found issues in 2 categories.

C:\Users\W10>flutter doctor --android-licenses Erro: ocorreu LinkageError ao carregar a classe principal com.android.sdklib.tool.sdkmanager.SdkManagerCli java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

já baixei a versao mais atualizada do java e tambem ja seque esse erro. essa abaixo é a versao mais atualizada? C:\Users\W10>java -version java version "22.0.1" 2024-04-16 Java(TM) SE Runtime Environment (build 22.0.1+8-16) Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)

3 respostas

Olá Kauan, blz?

Vc chegou a adicionar o "Android SDK Command-line tools" no Android Studio?

Etapas para adicionar o Android SDK Command-line tools no Android Studio

tem esse link que a galera explica melhor de como fazer isso: https://stackoverflow.com/questions/61993738/flutter-doctor-android-licenses-gives-a-java-error

Espero ter ajudado, abraço!

ja adicionei o android sdk command line tols porem continua o mesmo erro. C:\Users\W10>flutter doctor --android-licenses Erro: ocorreu LinkageError ao carregar a classe principal com.android.sdklib.tool.sdkmanager.SdkManagerCli java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Olá Kauan, blz?

Já resolvi esse problema de duas formas, a primeira forma foi o que te passei anteriormente e a segunda seria instalar/configurar o Flutter do zero.

Segue alguns links para te ajudar nisso:

https://www.alura.com.br/artigos/flutter-como-configurar-o-ambiente-de-desenvolvimento
https://medium.com/flutter-comunidade-br/instalando-e-configurando-flutter-no-windows-cae74711df1e
https://cursos.alura.com.br/course/flutter-widgets-stateless-stateful-imagens-animacoes/task/106959