从Linux编译应用程序时,flutter_secure_storage包给出错误

xtfmy6hx  于 2023-04-05  发布在  Linux
关注(0)|答案(1)|浏览(246)

当从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

jbose2ul

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

相关问题