QML import could not be resolved any of the import paths : QtQuick.Controls.Material.impl



  • I'm a beginner with Qt programing , i'm trying to build a native control application for smart home and i have some problem when i try to use the QtQuick.Controls.Material. The compile output report :

    seccess

    Warning : QML import could not be resolved any of the import paths: QtQuick.Controls.impl
    Warning : QML import could not be resolved any of the import paths: QtQuick.Controls.Material.impl

    It still working when i deploy the project on desktop Qt 5.7.1 MSVC2015 kit , but when i deploy on Android for x86 (GCC 4.9 , Qt 5.7.1) kit , it doesn't work

    please help me to fix it !



  • Compiling for Android gives such warnings, but for me the compiled application works nevertheless. As usual, you should provide more information: "it doesn't work" isn't enough. What you exactly do, what you expect to happen and what really happens/doesn't happen.



  • Thanks for reading my problem !
    My English still so bad , so i sorry for make you obscure !
    I try to build an user interface for the smart home control application and i want to add the Material style on the interface to change the color of theme and accent . It look good when i deploy my projeck on desktop Qt 5.7.1 MSVC2015 kit and run it , but when i deploy it on Android for x86 (GCC 4.9, Qt 5.7.1) and run it on Android virtual device it doesn't work , just a white screen in my app . The " Import QtQuick.Control. Material 2.0" has the red underline . Help me to fix it , please !



  • @Trung-Nguyen
    The white screen could be a problem with the Android emulator which comes with the Android SDK. I start the emulator from command line and add switch "-gpu swiftshader". I use cygwin terminal and have added an alias:

    alias emulator-6='/cygdrive/c/Users/Eeli/AppData/Local/Android/Sdk/tools/emulator.exe -avd 6 -gpu swiftshader'

    (The avd have been created with name "6" beforehand.)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.