thingsboard / flutter_thingsboard_pe_app

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

Can't build the flutter application. #197

Closed Vaibhav0216 closed 1 week ago

Vaibhav0216 commented 1 week ago

I follow the documentation of the thingsboard mobile development.

Below error comes on flutter run...

PS C:\Users\Admin\Desktop\flutter_thingsboard_app> flutter run "ar": 73 untranslated message(s). "zh": 92 untranslated message(s). "zh_CN": 92 untranslated message(s). "zh_TW": 91 untranslated message(s). To see a detailed report, use the untranslated-messages-file option in the l10n.yaml file: untranslated-messages-file: desiredFileName.txt :

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

FAILURE: Build completed with 2 failures.

1: Task failed with an exception. Where: Build file 'C:\Users\Admin\Desktop\flutter_thingsboard_app\android\build.gradle' line: 14

What went wrong: A problem occurred evaluating root project 'android'.

A problem occurred configuring project ':app'. Could not create task ':app:copyFlutterAssetsDebug'.

Could not create task ':app:mergeDebugAssets'.

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/.

2: Task failed with an exception. Where: Build file 'C:\Users\Admin\Desktop\flutter_thingsboard_app\android\build.gradle' line: 14

What went wrong: A problem occurred evaluating root project 'android'.

A problem occurred configuring project ':app'. Could not create task ':app:copyFlutterAssetsDebug'.

Could not create task ':app:mergeDebugAssets'. Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle_core() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.

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 Running Gradle task 'assembleDebug'... 2,666ms Error: Gradle task assembleDebug failed with exit code 1 PS C:\Users\Admin\Desktop\flutter_thingsboard_app>

ybeshkarov commented 1 week ago

Hi,

Please check if this response will help you resolve the issue https://github.com/thingsboard/flutter_thingsboard_pe_app/issues/194#issuecomment-2489107289

Vaibhav0216 commented 1 week ago

Hi @ybeshkarov But I am using jdk-17 version and i also tried,

C:\Users\Admin>fvm flutter config --jdk-dir "C:\Program Files\Java\jdk-17"
Setting "jdk-dir" value to "C:\Program Files\Java\jdk-17".

You may need to restart any open editors for them to read new settings.

But still error not gone.

Vaibhav0216 commented 1 week ago

Hi @ybeshkarov My java version

C:\Users\Admin>java --version
java 17.0.13 2024-10-15 LTS
Java(TM) SE Runtime Environment (build 17.0.13+10-LTS-268)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.13+10-LTS-268, mixed mode, sharing)
ybeshkarov commented 1 week ago

This is a PE repository, but you are building a CE app. So, we will proceed with the CE issues.

Vaibhav0216 commented 1 week ago

Sorry my mistake.