Import found outside of import paths error when building QML example for Android



  • Hi,

    I'm trying to build a QML example for Android. The builds fine for desktop,
    but when I try to build for android I get the following error:

    08:35:45: Running steps for project AppPlayground...
    08:35:45: Configuration unchanged, skipping qmake step.
    08:35:45: Starting: "/usr/bin/make"
    make: Nothing to be done for 'first'.
    08:35:45: The process "/usr/bin/make" exited normally.
    08:35:45: Removing directory /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/assets
    08:35:45: Removing directory /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/libs
    08:35:45: Starting: "/usr/bin/make" INSTALL_ROOT=/media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build install
    /home/pgrant/venture/qt/v-play2/5.9/android_armv7/bin/qmake -install qinstall directory /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/AppPlayground/qml /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/assets/qml
    /home/pgrant/venture/qt/v-play2/5.9/android_armv7/bin/qmake -install qinstall directory /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/AppPlayground/assets /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/assets/assets
    /home/pgrant/venture/qt/v-play2/5.9/android_armv7/bin/qmake -install qinstall file /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libAppPlayground.so.debug /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/libs/armeabi-v7a/libAppPlayground.so.debug
    /home/pgrant/venture/qt/v-play2/5.9/android_armv7/bin/qmake -install qinstall program libAppPlayground.so /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/libs/armeabi-v7a/libAppPlayground.so
    08:35:45: The process "/usr/bin/make" exited normally.
    08:35:45: Starting: "/home/pgrant/venture/qt/v-play2/5.9/android_armv7/bin/androiddeployqt" --input /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libAppPlayground.so-deployment-settings.json --output /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build --deployment bundled --android-platform android-26 --jdk /home/pgrant/bin/jdk1.8.0_91 --gradle
    Generating Android Package
    Input file: /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libAppPlayground.so-deployment-settings.json
    Output directory: /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/
    Application binary: /media/pgrant/extdev01/venture/qt/v-play2/Examples/V-Play/playground/build-AppPlayground-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libAppPlayground.so
    Android build platform: android-26
    Install to device: No
    Import found outside of import paths: /media/pgrant/extdev01/venture/qt/v-play2/5.9/android_armv7/qml/VPlayApps/controls.
    08:35:52: The process "/home/pgrant/venture/qt/v-play2/5.9/android_armv7/bin/androiddeployqt" exited with code 4.
    Error while building/deploying project AppPlayground (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.0 for Android armv7))
    When executing step "Build Android APK"

    I've searched around the error:
    "Import found outside of import paths:"

    and tried added:
    engine.addImportPath("/home/pgrant/venture/qt/v-play2/5.9/android_armv7/qml/QtQuick/Controls/");
    engine.addImportPath("/home/pgrant/venture/qt/v-play2/5.9/android_armv7/qml/QtQuick/Window.2/");

    to the main.cpp, but with no effect!

    Can anyone help?!?

    BR
    Paul


Log in to reply
 

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