QtQuick 2.12 is not installed

I have simple Qt-qml Hello world application which I am trying to run in Kiosk mode. I created snap for it. Following is the .yaml file.


name: qt-qml-app
version: “1”
summary: Qt QML Application Example
description: Hello world Qt Quick application
grade: stable
confinement: strict
base: core18

apps:
qt-qml-app:
environment:
# Use GTK3 cursor theme, icon theme and open/save file dialogs.
QT_QPA_PLATFORMTHEME: gtk3
QT_DEBUG_PLUGINS: 1
QML_IMPORT_TRACE: 1
command: desktop-launch qt_qml_app_1
plugs: [unity7, home, waylan, opengl, gsettings]

parts:
qt-quick:
source: https://github.com/qt/qtbase.git
plugin: qmake
build-packages:
- pkg-config
- qtbase5-dev
- qtwebengine5-dev
- libqt5websockets5-dev
- libqt5svg5-dev
- qttools5-dev-tools
- libuchardet-dev
- qtdeclarative5-dev
- qtquickcontrols2-5-dev
- qttools5-dev
- libjsoncpp1
- qmlscene
- libqt5quick5

stage-packages:
  - adwaita-icon-theme-full
  - bamfdaemon
  - coreutils
  - desktop-file-utils
  - gnome-menus
  - gtk2-engines-pixbuf
  - hicolor-icon-theme
  - libatk-adaptor
  - libcanberra-gtk-module
  - libgail-common
  - libqt5svg5
  - light-themes
  - man-db
  - mime-support
  - numix-gtk-theme
  - overlay-scrollbar-gtk2
  - packagekit-gtk3-module
  - qtbase5-dev
  - unity-gtk-module-common
  - unity-schemas
  - libnss3
  - libcanberra-gtk3-module
  - libqt5webengine5
  - libqt5quickwidgets5
  - libqt5webenginewidgets5
  - libuchardet0
  - qtwayland5
    #new
  - libjsoncpp1
  - libqt5qml5
  - libqt5quick5
  - libqt5quickcontrols2-5
  - libqt5concurrent5
  - libqt5core5a
  - libqt5gui5
  - qmlscene
  - qtdeclarative5-qtquick2-plugin
  - qml-module-qtquick-controls
  - qml-module-qtquick-controls2
  - qml-module-qtquick-templates2
  - qml-module-qt-labs-platform
  - qml-module-qtquick2
  - qml-module-qtqml-models2
  - qml-module-qt-labs-folderlistmodel
  - qml-module-qtquick-xmllistmodel
  - qml-module-qtwebchannel
  - qml-module-qtwebengine
  - qml-module-qtquick-dialogs
  - qml-module-qtquick-extras
    #new
  - qml-module-qtquick-layouts
  - qml-module-qtquick-localstorage
  - qml-module-qtquick-particles2
  - qml-module-qtquick-privatewidgets
  - qml-module-qtquick-scene2d
  - qml-module-qtquick-scene3d
  - qml-module-qtquick-virtualkeyboard
  - qml-module-qtquick-window2
after: [desktop-qt5]

desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
make-parameters: [“FLAVOR=qt5”]
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- try: [appmenu-qt5] # not available on core18
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5
- qtwayland5

qt5-gtk-platform:
plugin: nil
stage-packages:
- qt5-gtk-platformtheme

qt-qml-app:
plugin: dump
source: .
organize:
qt_qml_app_1: bin/

plugs:
common-themes-snap/6235
gsettings:
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes


Following error I am getting.

QQmlImportDatabase::addImportPath: “/snap/alto-app-new/x17/bin”
QQmlImports(qrc:/TouchScreen/main.qml)::addLibraryImport: “QtQuick” 2.14 as “”
QQmlImports(qrc:/TouchScreen/main.qml)::importExtension: loaded “/snap/alto-app-new/x17/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2/qmldir”
Found metadata in lib /snap/alto-app-new/x17/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2/libqtquick2plugin.so, metadata=
{
“IID”: “org.qt-project.Qt.QQmlExtensionInterface/1.0”,
“MetaData”: {
},
“className”: “QtQuick2Plugin”,
“debug”: false,
“uri”: [
“QtQuick.2”
],
“version”: 329989
}

loaded library “/snap/alto-app-new/x17/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2/libqtquick2plugin.so”
QQmlImportDatabase::registerPluginTypes: “QtQuick” from “/snap/alto-app-new/x17/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2”
QQmlApplicationEngine failed to load component
qrc:/TouchScreen/main.qml:1 module “QtQuick” version 2.14 is not installed