0

I have a flutter application. I install and configure firebase in my app. After that, I try to run my app on windows, but flutter return this error (when I run flutter run -d windows -v command).

[   +2 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +5 ms] "flutter run" took 2,450,242ms.
[   +4 ms]
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:757:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1336:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:91:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>

Note that I run these commands

flutter pub clean
flutter pub cache clean
flutter pub get 
flutter run

and also I try to reinstall flutter and also reinstall windows and the error is still generated!!

[  +85 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:90 (add_subdirectory):
[  +23 ms]   The source directory
[   +3 ms]     <path-to-app>/build/windows/extracted/firebase_cpp_sdk
[        ]   does not contain a CMakeLists.txt file.
[        ] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:95 (get_target_property):
[   +5 ms]   get_target_property() called with non-existent target "firebase_app".
[        ] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:96 (string):
[        ]   string sub-command REPLACE requires at least four arguments.
[        ] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:97 (set_target_properties):
[        ]   set_target_properties Can not find target to add properties to:
[   +9 ms]   firebase_app
[ +127 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:95 (get_target_property):
[  +78 ms]   get_target_property() called with non-existent target "firebase_auth".
[  +98 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:96 (string):
[  +60 ms]   string sub-command REPLACE requires at least four arguments.
[ +167 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:97 (set_target_properties):
[ +147 ms]   set_target_properties Can not find target to add properties to:
[ +183 ms]   firebase_auth
[ +265 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:95 (get_target_property):
[   +1 ms]   get_target_property() called with non-existent target
[  +55 ms]   "firebase_remote_config".
[  +96 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:96 (string):
[ +107 ms]   string sub-command REPLACE requires at least four arguments.
[ +158 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/firebase_core/windows/CMakeLists.txt:97 (set_target_properties):
[ +126 ms]   set_target_properties Can not find target to add properties to:
[  +23 ms]   firebase_remote_config

and also my app is not build in android after that and generate this error:

FAILURE: Build failed with an exception.
[        ] * What went wrong:
[        ] Execution failed for task ':flutter_libserialport:buildCMakeDebug[arm64-v8a]'.
[        ] > com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\--\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_libserialport-0.3.0\android\.cxx\Debug\406q6x2e\arm64-v8a'[        ]   [1/5] Building C object CMakeFiles/serialport.dir/6c4fe2c82c5e28a6a42e1fa64dbeef9a/third_party/libserialport/linux_termios.c.o
[        ]   FAILED: CMakeFiles/serialport.dir/6c4fe2c82c5e28a6a42e1fa64dbeef9a/third_party/libserialport/linux_termios.c.o
[   +1 ms]   <path-to-sdk>\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=aarch64-none-linux-android21
--sysroot=<path-to-sdk>/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DLIBSERIALPORT_ATBUILD -Dserialport_EXPORTS
-IC:/Users/--/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_libserialport-0.3.0/android/libserialport
-IC:/Users/--/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_libserialport-0.3.0/android/libserialport/../../third_party/libserialport -DANDROID -fdata-sections -ffunction-sections -funwind-tables
-fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fexceptions -g  -fno-limit-debug-info -fPIC -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow
-MD -MT CMakeFiles/serialport.dir/6c4fe2c82c5e28a6a42e1fa64dbeef9a/third_party/libserialport/linux_termios.c.o -MF
CMakeFiles\serialport.dir\6c4fe2c82c5e28a6a42e1fa64dbeef9a\third_party\libserialport\linux_termios.c.o.d -o
CMakeFiles/serialport.dir/6c4fe2c82c5e28a6a42e1fa64dbeef9a/third_party/libserialport/linux_termios.c.o -c
C:/Users/--/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_libserialport-0.3.0/third_party/libserialport/linux_termios.c
[   +2 ms]   C:/Users/--/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_libserialport-0.3.0/third_party/libserialport/linux_termios.c:98:9: error: invalid application of 'sizeof' to an incomplete type
'struct termiox'

please help me!! before I add firebase to my project everything is worked!!

Note that this app build and work correctly on my teammate windows! (both of android and windows)

here is flutter doctor result: enter image description here

Mohamadamin
  • 564
  • 5
  • 16

1 Answers1

0

@Mohamadamin This is a dependency issue with dhttpd package do check dart package. Hope this helps!