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

How to compile for Android in Ubuntu?



  • Hi!
    How to compile for Android in Ubuntu?
    I've set everything up, but the apk file doesn't compile.
    Qt get this error:

    Generating Android Package
    Input file: /home/profitpoint/projects/build-testUi-Android_armeabi_v7a_Clang_Qt_5_13_1_for_Android_ARMv7-Debug/android-libtestUi.so-deployment-settings.json
    Output directory: /home/profitpoint/projects/build-testUi-Android_armeabi_v7a_Clang_Qt_5_13_1_for_Android_ARMv7-Debug/android-build/
    Application binary: /home/profitpoint/projects/build-testUi-Android_armeabi_v7a_Clang_Qt_5_13_1_for_Android_ARMv7-Debug/libtestUi.so
    Android build platform: android-29
    Install to device: No
    Warning: QML import could not be resolved in any of the import paths: QtQuick.VirtualKeyboard
    Warning: QML import could not be resolved in any of the import paths: QtQuick.VirtualKeyboard.Styles
    Warning: QML import could not be resolved in any of the import paths: QtQuick.VirtualKeyboard.Settings
    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.impl
    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.Imagine.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.Universal.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl

    3.png



  • @Mihaill

    Nothing in your post indicates the build failed. Are you sure it did? Try deploying to an AVD.

    I build on Ubuntu and you don't have to do anything special to make it work. Here's what I do:

    1. Install Android Studio
    2. Install the Android SDK and NDK from Android Studio
    3. Create an AVD from Android Studio
    4. Install Qt
    5. Test your install by building one of the Android examples in Qt Creator (I suggest Gallery)

    PROTIP: If you plan on using the rotation sensor, stick with Qt 5.12.3, as it is broken in 5.12.4+
    QTBUG-77628



  • I install Android Studio, but un ubuntu I do not understand how instaled NDK from Android Studio.




Log in to reply