What went wrong:
Could not open settings generic class cache for settings file 'D:\flutter_app\flutter_reactive_ble\example\android\settings.gradle' (C:\Users\Admin.gradle\caches\7.0.2\scripts\9ro1u0k9hdyieqwldgdt37f3r).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 61
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.
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:\flutter_app\flutter_reactive_ble\example\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
FAILURE: Build failed with an exception.
What went wrong: Could not open settings generic class cache for settings file 'D:\flutter_app\flutter_reactive_ble\example\android\settings.gradle' (C:\Users\Admin.gradle\caches\7.0.2\scripts\9ro1u0k9hdyieqwldgdt37f3r).
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:\flutter_app\flutter_reactive_ble\example\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==================
Gradle setting in default example project
defaultConfig { applicationId "com.signify.hue.reactivebleexample" minSdkVersion 21 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName }