#[FLUTTER] cant debug first app

25 messages · Page 1 of 1 (latest)

dense cliff
#

I tried: Cleaning C:\Users\muta\.gradle\caches

#

prob not good to post this on exercism

#

java i have PS C:\Users\muta> java --version openjdk 11.0.19 2023-04-18 OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7) OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)

#

error:```Launching lib\main.dart on SM A025G in debug mode...

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not open settings generic class cache for settings file 'D:\Coding\Flute\flutter_application\android\settings.gradle' (C:\Users\muta
    .gradle\caches\7.5\scripts\3d075fs9hjp81ny0sgym4v09w).

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.

BUILD FAILED in 1s

┌─ Flutter Fix ─────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using │
│ for Gradle. │
│ │
│ To fix this issue, first, check the Java version used by Flutter by running flutter doctor │ │ --verbose. │
│ │
│ Then, update the Gradle version specified in │
│ D:\Coding\Flute\flutter_application\android\gradle\wrapper\gradle-wrapper.properties to be │
│ compatible with that Java version. See the link below for more information on compatible │
│ Java/Gradle versions: │
https://docs.gradle.org/current/userguide/compatibility.html#java
Exception: Gradle task assembleDebug failed with exit code 1```

strange totem
#

read the error message, it's telling you exactly what's wrong and how to fix it

lilac stirrup
#

"Your project's Gradle version is incompatible with the Java version that Flutter is using │
│ for Gradle. "

dense cliff
#

Yes i know

#

but then flutter doctor doesnt work and produces same error

#

it seems that flutter doesnt support anything over java 11

#

because that what it was bundled with

lilac stirrup
#

which version are you using?

dense cliff
lilac stirrup
#

Which verison of java, since flutter should support never version of java

dense cliff
#
openjdk 11.0.19 2023-04-18
OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7)
OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)```
#

newest java

dense cliff
#

SOLIUTION:

#

NO JAVA WAS NEEDED

#

HAHAHHA

#

temporary though

#

bcs this is system variable other software uses java too

dense cliff
#

though then i dont undearstand if it was bundled why it was not set automatically

strange totem
#

because system variables override that

dense cliff