androidflutterdartflutter-audioplayers

Flutter a required Package wasn't found


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


Solution

  • 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.