1
resposta

Erro após executar 'flutter run'

segue erro : C:\Users\Optmus Prime\bytebank>flutter run

Using hardware rendering with device sdk gphone x86 arm. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib\main.dart on sdk gphone x86 arm in debug mode...

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.

    java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x1212c84f) cannot access class com.sun.tools.javac. code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x1212c84f

  • 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 4s Running Gradle task 'assembleDebug'... Running Gradle task 'assembleDebug'... Done 5,0s Exception: Gradle task assembleDebug failed with exit code 1

1 resposta

Olá Leandro

experimente

flutter doctor -v

algum erro?

flutter run --enable-software-rendering

e neste ainda ocorre?

Problemas com SDK, eu setei o Path no Android Studio.

outros comandos que ouço é

flutter clean

Neste post, há muita referência para realizar o updgrade do Gradle https://github.com/gradle/gradle/issues/15538

Conte-nos sua jornada e solução