thingsboard / flutter_thingsboard_pe_app

ThingsBoard PE Mobile Application
https://thingsboard.io/products/mobile-pe/
BSD 3-Clause "New" or "Revised" License
90 stars 73 forks source link

Wrong Java and/or gradle version #194

Open pyttel opened 1 week ago

pyttel commented 1 week ago

I used flutter 3.22 with fvm. This seems to work fine. But running

fvm flutter run

results in following output:

Downloading android-arm-profile/windows-x64 tools...             1.165ms
Downloading android-arm-release/windows-x64 tools...             1.027ms
Downloading android-arm64-profile/windows-x64 tools...             588ms
Downloading android-arm64-release/windows-x64 tools...           1.030ms
Downloading android-x64-profile/windows-x64 tools...             1.053ms
Downloading android-x64-release/windows-x64 tools...             1.056ms
"ar": 36 untranslated message(s).
"zh": 55 untranslated message(s).
"zh_CN": 55 untranslated message(s).
"zh_TW": 54 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>

This will generate a JSON format file containing all messages that
need to be translated.
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...

FAILURE: Build failed with an exception.

* Where:
Settings file 'C:\XXX\flutter_thingsboard_pe_app_new\android\settings.gradle' line: 11

* What went wrong:
A problem occurred evaluating settings 'android'.
> Could not open dsl generic class cache for script 'C:\Users\XXX\fvm\versions\3.22.0\packages\flutter_tools\gradle\app_plugin_loader.gradle' (C:\Users\XXX\.gradle\caches\7.5.1\scripts\52aiuihnp1jjwj8egvztp2z2h).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

* 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 9s
Running Gradle task 'assembleDebug'...                             10,4s

┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using for Gradle.                                                                                                                                                               │
│                                                                                                                                                                                                                                                                         │
│ If you recently upgraded Android Studio, consult the migration guide at docs.flutter.dev/go/android-java-gradle-error.                                                                                                                                                  │
│                                                                                                                                                                                                                                                                         │
│ Otherwise, to fix this issue, first, check the Java version used by Flutter by running `flutter doctor --verbose`.                                                                                                                                                      │
│                                                                                                                                                                                                                                                                         │
│ Then, update the Gradle version specified in C:\Users\XXX\Desktop\Arbeitsordner\flutter_thingsboard_pe_app_new\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                                                                                                                                                                                                       │
│                                                                                                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1

Here the gradle props:

------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.17 (Amazon.com Inc. 11.0.17+8-LTS)
OS:           Windows 11 10.0 amd64

So what JVM and gradle version are supported for release 1.3.0?

Tasosgi commented 1 day ago

Could you please provide an update on the progress of this issue? I'm experiencing the same issue and would appreciate any insight.

Gorbas commented 1 day ago

I am facing the same issue.