Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Some errors when building a QML program using the Arm7 kit



  • Hello all,

    I installed a great bunch of SDK packages and went for building the APK file of a QML application using the Build button of the Arm7 kit on Qt Creator 4.8.0.
    There're, unfortunately, a number or errors and warnings which are quite astonishing for me because everything is seemingly proper.

    Here's my Devices:

    0_1545868116488_Capture.PNG

    When building, I got the following errors and warnings in red:

    FAILURE: Build failed with an exception.

    What went wrong:
    Could not determine java version from '11.0.1'.

    Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    Get more help at https://help.gradle.org

    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
    Building the android package failed!
    -- For more information, run this command with --verbose.
    23:23:03: The process "C:\Qt\5.12.0\android_armv7\bin\androiddeployqt.exe" exited with code 14.

    Error while building/deploying project Ping_Pong (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7))
    When executing step "Build Android APK"
    *

    The errors and warnings pertain to JDK and QtQuick.Controls apparently.
    Jdk is the updated version and here is the controls I used in mani.qml for instance:

    import QtQuick 2.12
    import QtQuick.Window 2.11
    import QtQuick.Controls 2.4
    

    What is the problem, why still do I get these errors, please?


  • Lifetime Qt Champion

    @tomy can you also show your Android Kit, too?



  • @aha_1980
    Did you mean this page?

    0_1545899405480_Capture.PNG


  • Lifetime Qt Champion

    @tomy yep. that one looks good.

    Unfortunately, I'm out here - never done Android...


  • Lifetime Qt Champion

    Hi,

    Quick idea, since it's complaining about the java version. I'd go back to 1.8. IIRC, it was the version suggested in the doc.



  • @SGaist
    Hi,
    Do you mean "jdk-8u191-windows-x64" please?


  • Moderators

    @tomy seems about right, it's the same version I'm also using.



  • @J.Hilk

    I used that jdk, and built the app this time. But got many errors:

    FAILURE: Build failed with an exception.

    What went wrong:
    Execution failed for task ':processDebugResources'.
    Android resource linking failed
    Output: C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:39: error: 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density' is incompatible with attribute configChanges (attr) flags [locale=4, fontScale=1073741824, keyboard=16, keyboardHidden=32, layoutDirection=8192, mcc=1, mnc=2, navigation=64, orientation=128, screenLayout=256, screenSize=1024, smallestScreenSize=2048, touchscreen=8, uiMode=512].
    error: failed processing manifest.

    Command: C:\Users\Abbasi.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\83adb1c826b3da76392f22b7ff050e9c\aapt2-3.2.0-4818971-windows\aapt2.exe link -I
    C:\Users\Abbasi\AppData\Local\Android\sdk\platforms\android-21\android.jar
    --manifest
    C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
    -o
    C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
    -R
    @C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
    --auto-add-overlay
    --java
    C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
    --custom-package
    org.qtproject.example.Ping_Pong
    -0
    apk
    --no-version-vectors
    Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
    Output: C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:39: AAPT: error: 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density' is incompatible with attribute configChanges (attr) flags [locale=4, fontScale=1073741824, keyboard=16, keyboardHidden=32, layoutDirection=8192, mcc=1, mnc=2, navigation=64, orientation=128, screenLayout=256, screenSize=1024, smallestScreenSize=2048, touchscreen=8, uiMode=512].

    error: failed processing manifest.
    *Command: C:\Users\Abbasi.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\83adb1c826b3da76392f22b7ff050e9c\aapt2-3.2.0-4818971-windows\aapt2.exe link -I
    C:\Users\Abbasi\AppData\Local\Android\sdk\platforms\android-21\android.jar
    --manifest*
    *C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
    -o*
    *C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
    -R*
    *@C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
    --auto-add-overlay
    --java*
    C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Ping_Pong\Ping_Pong\build-Ping_Pong-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
    --custom-package
    org.qtproject.example.Ping_Pong
    -0
    apk
    --no-version-vectors
    Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0

    ** Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.*

    Get more help at https://help.gradle.org

    BUILD FAILED in 8s
    14 actionable tasks: 14 executed
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
    Building the android package failed!

    -- For more information, run this command with --verbose.
    00:51:27: The process "C:\Qt\5.12.0\android_armv7\bin\androiddeployqt.exe" exited with code 14.

    Error while building/deploying project Ping_Pong (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7))
    When executing step "Build Android APK"
    00:51:27: Elapsed time: 00:24.



  • I run into this problem too. Use Android NDK r17 instead of 18.



  • @JoZCaVaLLo

    I went for downloading android-ndk-r17c-windows-x86_64.zip. Is it the correct one?



  • Yes. Try with that one.



  • @JoZCaVaLLo

    No changes unfortunately!


Log in to reply