[英]Flutter A required package was not found flutter_secure_storage/linux/CMakeLists.txt:14
A required package was not found Call Stack (most recent call first): /snap/flutter/101/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal) flutter/ephemeral/.plugin_symlinks/flutter_secure_storage/linux/CMakeLists.txt:14 (pkg_check_modules)未找到所需的 package 调用堆栈(最近调用优先):/snap/flutter/101/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal) flutter/ephemeral/.plugin_symlinks/flutter_secure_storage/linux /CMakeLists.txt:14 (pkg_check_modules)
In the doc of the package you can see it needs libsecret.在包的文档中,您可以看到它需要 libsecret。
You just need to install the following packages:您只需要安装以下软件包:
sudo apt install libsecret-1-dev libsecret-tools libsecret-1-0
That worked for me :)这对我有用:)
sudo apt-get install libsecret-1-dev libjsoncpp-dev libsecret-1-0
为我工作
If you, like me, already have libsecret-1-dev, libjsoncpp-dev and libsecret-1-0 installed, look in the message for the line of CMakeList.txt which error occurs:如果您和我一样,已经安装了 libsecret-1-dev、libjsoncpp-dev 和 libsecret-1-0,请在消息中查找发生错误的 CMakeList.txt 行:
Call Stack (most recent call first): ...
调用堆栈(最近的调用优先):...
flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/CMakeLists.txt:14 (pkg_check_modules)flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/CMakeLists.txt:14 (pkg_check_modules)
Line 14, in case: pkg_check_modules(JSONCPP REQUIRED IMPORTED_TARGET jsoncpp )
第 14 行,以防: pkg_check_modules(JSONCPP REQUIRED IMPORTED_TARGET jsoncpp )
So, all you need is install the package missing.因此,您只需要安装缺少的软件包即可。 Im my case (Ubuntu 18.04) the package is libjsoncpp-dev:
我的情况(Ubuntu 18.04)包是libjsoncpp-dev:
$ sudo apt install libjsoncpp-dev
On my side, I removed the firebase_ui_auth: ^1.1.6 package from my project and it was able to run.在我这边,我从我的项目中删除了 firebase_ui_auth : ^1.1.6 package 并且它能够运行。 I think there might be a bug in the package. Run:
我认为 package 中可能存在错误。运行:
$ flutter pub remove firebase_ui_auth
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.