type hereCMake 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/audioplayers_linux/linux/CMakeLists.txt:25 (pkg_check_modules)
I’m trying to play an audiofile using the audioplayers package, then on trying to run my app, I get this error
3
Answers
It shows that you're running your app using Linux which explains the
CMake
folder. You may have change the folder name of your flutter project, try to rename it as it was before. Or move the flutter app in the folder it was initially.Install Flutter according to the instructions here, instead of using the Snap package. The snap package is known to cause these kind of problems unfortunately.
sudo apt-get install –reinstall pkg-config cmake-data