flutter runLinux 桌面应用程序出现此错误
Running "flutter pub get" in proj... 5.3s\nLaunching lib/main.dart on Linux in debug mode...\nCMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):\n The C++ compiler\n\n "/usr/bin/clang++"\n\n is not able to compile a simple test program.\n\n It fails with the following output:\n\n Change Dir: /media/kingbob/Dvolve/EData/proj/build/linux/x64/debug/CMakeFiles/CMakeTmp\n\n Run Build Command(s):/usr/bin/ninja cmTC_5f1b6 && [1/2] Building CXX object CMakeFiles/cmTC_5f1b6.dir/testCXXCompiler.cxx.o\n [2/2] Linking CXX executable cmTC_5f1b6\n FAILED: cmTC_5f1b6 \n : && /usr/bin/clang++ CMakeFiles/cmTC_5f1b6.dir/testCXXCompiler.cxx.o -o cmTC_5f1b6 && :\n /usr/bin/ld: cannot find -lstdc++: No such file or directory\n clang: …Run Code Online (Sandbox Code Playgroud) 我们希望通过 Github Actions 使我们的集成测试能够在 Linux 桌面(ubuntu-latest)上运行。
命令是
flutter config --enable-linux-desktop
flutter test -d linux integration_test
Run Code Online (Sandbox Code Playgroud)
但我们总是得到一个错误:
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
//...
TestDeviceException(Unable to start the app on the device.)
package:flutter_tools/src/test/integration_test_device.dart 61:7 IntegrationTestTestDevice.start
Run Code Online (Sandbox Code Playgroud)
Github Actions 是否无法在 CPU 上足够快地处理 GPU/GUI 相关的内容或者发生了什么?这可能吗?我发现只有一个存储库可以为 Linux 环境调用类似的命令。
谢谢!
gui-testing flutter github-actions flutter-linux flutter-integration-test
我最近使用 Ubuntu 从 Ubuntu 切换回带有适用于 Linux 的 Windows 子系统的 Windows。我想与 Flutter 取得联系,并希望能够在 Windows 上开发时将 bash 用于 Flutter 命令。这是可能的还是我应该只为 Windows 安装所有东西?。
当我尝试将应用程序构建到 Flutter Desktop 时,它失败并显示以下消息:
\nLaunching lib/main.dart on Linux in debug mode...\nException: Build process failed\nRun Code Online (Sandbox Code Playgroud)\n我的配置是:
\nDoctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel master, 1.19.0-2.0.pre.142, on Linux, locale pt_BR.UTF-8)\n \n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 29.0.2)\n[\xe2\x9c\x93] Linux toolchain - develop for Linux desktop\n[\xe2\x9c\x93] Android Studio (version 3.6)\n[\xe2\x9c\x93] Connected device (1 available)\nRun Code Online (Sandbox Code Playgroud)\n谁能知道如何解决这个问题?
\n谢谢
\n我有flutter项目,可以在Ubuntu 20.04上成功构建。现在我想在 Ubuntu 22.04 上构建它,但出现 CMake 错误。
\nCMake Error at /snap/flutter/111/usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message):\n The C++ compiler\n\n "/snap/flutter/current/usr/bin/clang++"\n\n is not able to compile a simple test program.\n\n It fails with the following output:\n\n Change Dir: /home/arzak/StudioProjects/testlinux/build/linux/x64/debug/CMakeFiles/CMakeTmp\n\n Run Build Command:"/snap/flutter/current/usr/bin/ninja" "cmTC_38e6c"\n [1/2] Building CXX object CMakeFiles/cmTC_38e6c.dir/testCXXCompiler.cxx.o\n [2/2] Linking CXX executable cmTC_38e6c\n FAILED: cmTC_38e6c \n : && /snap/flutter/current/usr/bin/clang++ -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/8 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -lblkid -lgcrypt -llzma -lpthread -ldl -L/snap/flutter/current/usr/lib/ CMakeFiles/cmTC_38e6c.dir/testCXXCompiler.cxx.o -o cmTC_38e6c && :\n /snap/flutter/current/usr/bin/ld: warning: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crt1.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0008002\n /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libgcc_s.so.1: undefined reference to …Run Code Online (Sandbox Code Playgroud)