1
resposta

[Dúvida] NA HORA DE RODAR O EMULADOR DA ESSE ERRO POREM SE RODAR DO GOOGLE RODA NORMAL

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\ricar\StudioProjects\primeiro_app\android\app\build.gradle' line: 26

  • What went wrong: A problem occurred evaluating project ':app'.

    Could not open cp_dsl generic class cache for script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' (C:\Users\ricar.gradle\caches\7.5\scripts\40csztap1d1kxb1r7kj4vq4so). BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with exit code 1

1 resposta

voce mexeu na versao do sdk? ele ta com valor 63, que nao é valido.

verifica o arquivo build.gradle em android\app\src procura essa estrutura aqui e confere o sdk version

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "br.com.seusoftware"
        minSdkVersion 21
        targetSdkVersion 33
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }