Snapcraft qml 模块

Snapcraft qml 模块

我正在 qt/qml 上制作一个简单的应用程序,但我无法使该应用程序变得快速。

snapcraft write error :Project ERROR: Unknown module(s) in QT: qml quick.

我的源代码

我的 snapcraft 文件:

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]

答案1

我通过在 snapcraft 文件中添加以下行解决了这个问题: build-packages: - qtdeclarative5-dev

相关内容