Cannot generate a safe runtime search path for target `hotkey_manager_linux_plugin` because files in some directories may conflict with libraries in implicit directories:

name: fafarunner
version: 1.0.11.377
summary: Enjoy smooth gameplay, stunning graphics, and endless fun.
description: |
  Step into the enchanting world of FaFa Runner: Dawn Legends, where an epic adventure awaits! Developed using Flutter and the Flame engine, this RPG delivers a seamless gaming experience with stunning visual effects.
  
  Embark on your journey as a brave adventurer, explore mysterious lands, uncover hidden secrets, and face endless challenges. With rich story-driven quests and diverse character progression systems, every battle offers a unique sense of achievement.

  Key Features:
  1. Dynamic Combat System: Enjoy intuitive controls and fluid action as you take on powerful enemies and formidable bosses.
  2. Gorgeous Visuals: Experience vivid graphics and captivating animations, thanks to the powerful Flutter and Flame engine.
  3. Rich Quest System: Engage in main quests and side stories, with each adventure offering surprises and challenges.
  4. Customizable Character Growth: Tailor your hero with various skills and equipment to build the ultimate warrior.
  5. Interactive World Exploration: Discover hidden treasures and secret locations across a fantastical map.
  
  Join FaFa Runner: Dawn Legends and create your own legendary tale in this magical world. Download now and begin your epic adventure!
icon: snap/gui/fafarunner.png
title: FaFa Runner
contact: hello@kjxbyz.com
license: MIT
source-code: https://github.com/fafarunner/fafarunner
issues: https://github.com/fafarunner/fafarunner/issues
website: https://www.fafarunner.com
confinement: strict
base: core24
grade: stable
slots:
  dbus-fafarunner: # adjust accordingly to your app name
    interface: dbus
    bus: session
    name: com.fafarunner.FaFaRunner # adjust accordingly to your app name and
apps:
  fafarunner:
    command: fafarunner
    extensions: [gnome] # gnome includes the libraries required by flutter
    plugs:
      - network
    slots:
      - dbus-fafarunner
parts:
  fafarunner:
    source: .
    plugin: flutter
    # flutter-target: lib/main.dart # The main entry-point file of the application
    build-environment:
      - FLUTTER_REPO: https://github.com/flutter/flutter.git
      - FLUTTER_VERSION: 3.29.2
      - FLUTTER_TARGET: lib/main.dart
    build-packages:
      - curl
      - libcurl4-openssl-dev
      - git
      - unzip
      - xz-utils
      - zip
      - libglu1-mesa
      - clang
      - cmake
      - ninja-build
      - pkg-config
      - libgtk-3-dev
      - liblzma-dev
      - libstdc++-12-dev
      - libunwind-dev
      - libgstreamer1.0-dev
      - libgstreamer-plugins-base1.0-dev
      - libkeybinder-3.0-0
      - libkeybinder-3.0-dev
      - libayatana-appindicator3-dev
    override-build: |
      # https://github.com/canonical/snapcraft/blob/main/snapcraft/parts/plugins/flutter_plugin.py
      FR_FLUTTER_BUILD_DIR="$CRAFT_PART_BUILD/flutter-distro"
      if [ -d "$FR_FLUTTER_BUILD_DIR" ]; then
        echo "$FR_FLUTTER_BUILD_DIR"
        rm -rf $FR_FLUTTER_BUILD_DIR
      fi
      git clone --depth 1 -b $FLUTTER_VERSION $FLUTTER_REPO $FR_FLUTTER_BUILD_DIR
      
      # https://github.com/canonical/snapcraft/pull/5264
      # Fixed in 3.29.1
      # rm -f "$FR_FLUTTER_BUILD_DIR/engine/src/.gn"
      flutter doctor -v
      flutter precache --linux
      flutter pub get
      flutter build linux --release --dart-define-from-file=.env --target $FLUTTER_TARGET
      cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/

CMake Warning at flutter/ephemeral/.plugin_symlinks/hotkey_manager_linux/linux/CMakeLists.txt:21 (add_library):
::   Cannot generate a safe runtime search path for target
::   hotkey_manager_linux_plugin because files in some directories may conflict
::   with libraries in implicit directories:
::
::     runtime library [libgtk-3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libgdk-3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libpangocairo-1.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libpango-1.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libharfbuzz.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libatk-1.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libcairo-gobject.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libcairo.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libgdk_pixbuf-2.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libgio-2.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libgobject-2.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::     runtime library [libglib-2.0.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
::       /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu
::
::   Some of these libraries may not be found correctly.
::
::
:: /root/parts/fafarunner/build/linux/flutter/ephemeral/.plugin_symlinks/tray_manager/linux/tray_manager_plugin.cc:118:17: warning: 'app_indicator_new' is deprecated [-Wdeprecated-declarations]
:: ✓ Built build/linux/x64/release/bundle/fafarunner
:: + cp -r build/linux/x64/release/bundle/data build/linux/x64/release/bundle/fafarunner build/linux/x64/release/bundle/lib /root/parts/fafarunner/install/
Building gnome/sdk
:: + make -j4 GPU_WRAPPER=gpu-2404-wrapper
:: make: 'Makefile' is up to date.
:: + make -j4 install GPU_WRAPPER=gpu-2404-wrapper DESTDIR=/root/parts/gnome/sdk/install
:: install -D -m755 "hooks-configure-fonts" "/root/parts/gnome/sdk/install/snap/command-chain"/"hooks-configure-fonts"
:: install -D -m755 "desktop-launch" "/root/parts/gnome/sdk/install/snap/command-chain"/"desktop-launch"
:: install -D -m755 "run" "/root/parts/gnome/sdk/install/snap/command-chain"/"run"
:: install -D -m755 "gpu-2404-wrapper" "/root/parts/gnome/sdk/install/snap/command-chain"/"gpu-2404-wrapper"
Staging fafarunner
Staging gnome/sdk
Priming fafarunner
Priming gnome/sdk
Packing...
Reading snap metadata...
Running linters...
Running linter: classic
Running linter: library
Lint warnings:
- library: fafarunner: missing dependency 'libkeybinder-3.0.so.0'. (provided by 'libkeybinder-3.0-0') (https://snapcraft.io/docs/linters-library)
- library: lib/libhotkey_manager_linux_plugin.so: missing dependency 'libkeybinder-3.0.so.0'. (provided by 'libkeybinder-3.0-0') (https://snapcraft.io/docs/linters-library)

You do not have any stage-packages defined, so your snap will not ship any libraries… Clean up your build-packages, only keep development stuff in there and move the non development library packages into a stage-packages block so they end up inside your snap to allow your application to find them at runtime

Thank you very much!