I am making a simple application on qt/qml, but I can't make the application into a snap.
snapcraft write error :Project ERROR: Unknown module(s) in QT: qml quick.
My snapcraft file:
name: hanoi-solution # you probably want to 'snapcraft register <name>'
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Solution for Hanoi Towers # 79 char long summary
description: |
This application shows solution for Hanoi Towers.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
icon: icon.png
apps:
hanoi-solution:
command: desktop-launch $SNAP/opt/myapp/hanoi_solution
desktop: "$SNAP/meta/gui/Hanoi Solution.desktop"
plugs: [home, unity7, x11]
parts:
hanoi-solution:
plugin: qmake
qt-version: qt5
project-files: [HanoiSolution.pro]
source: source
install: |
install -d $SNAPCRAFT_PART_INSTALL/opt/myapp
install hanoi_solution $SNAPCRAFT_PART_INSTALL/opt/myapp/hanoi_solution
stage-packages:
- qmlscene
- libqt5qml5
- libqt5gui5
- libqt5quick5
- qml-module-qtquick2
- qml-module-qtquick-dialogs
- qml-module-qtquick-controls
after: [desktop-qt5]
I managed to solve this problem by adding the following line to the snapcraft file:
build-packages: - qtdeclarative5-dev