#[FLUTTER] cant debug first app
25 messages · Page 1 of 1 (latest)
prob not good to post this on exercism
In this codelab, you’ll learn how to build a Flutter app that generates random, cool-sounding names.
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.
- Get more help at https://help.gradle.org
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```
read the error message, it's telling you exactly what's wrong and how to fix it
i read it & it doesnt
"Your project's Gradle version is incompatible with the Java version that Flutter is using │
│ for Gradle. "
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
which version are you using?
which what? gradle is 7.5 (bundled in with project) and for java 11
Which verison of java, since flutter should support never version of java
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
SOLIUTION:
NO JAVA WAS NEEDED
HAHAHHA
temporary though
bcs this is system variable other software uses java too
though then i dont undearstand if it was bundled why it was not set automatically
because system variables override that
yeah but setting in user variables didnt work