当从Linux编译应用程序时,flutter_secure_storage包给出错误。
错误:-
Launching lib/main.dart on Linux in debug mode...
main.dart:1
CMake Error at /snap/flutter/130/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/snap/flutter/130/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/CMakeLists.txt:14 (pkg_check_modules)
Exception: Unable to generate build files
Exited (sigterm)
我尝试了以下命令。
x一个一个一个一个x一个一个二个x
1条答案
按热度按时间jbose2ul1#
我刚刚找到了解决这个问题的方法,对我来说,这是一个什么样的工作:将“your_app/linux/flutter/ephemeral/.plugin_symlink/flutter_secure_storage_linux/linux/CMakeLists.txt”中的“pkg_check_modules(LIBSECRET REQUIRED IMPORTED_TARGET libsecret〉= 0.18.4)”更改为“pkg_check_modules(LIBSECRET REQUIRED IMPORTED_TARGET libsecret-1〉=0.18.4)”
你也可以安装jsoncpp-dev
然后运行$flutter clean $flutter run -d linux