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 -
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:
- Install Android Studio
- Install the Android SDK and NDK from Android Studio
- Create an AVD from Android Studio
- Install Qt
- 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