[Solved] Qt 5.5 Android no qtquick UI
-
Hi, I built Qt 5.5 for Android as described in http://qt-project.org/wiki/Qt5ForAndroidBuilding, modifying the two lines in qt5/qtbase/mkspecs/android-g++ :
- QMAKE_CFLAGS = -Wno-psabi -march=armv7ve -mtune=cortex-a15.cortex-a7 -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mhard-float -mfloat-abi=hard -D_NDK_MATH_NO_SOFTFP=1 -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -fno-builtin-memmove -ftree-vectorize -ftree-vectorizer-verbose=1 -Wno-error=cast-align
- QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH -Wl,--no-warn-mismatch -lm_hard
in order to cross compile for my specific device.
Then- ../configure -xplatform android-g++ -developer-build -opensource -nomake tests -nomake examples -android-sdk $HOME/android-sdk-linux -android-ndk $HOME/android-ndk-r10d -android-toolchain-version 4.9 -android-ndk-host linux-x86_64 -android-arch armeabi-v7a -no-warnings-are-errors -skip qtactiveqt -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtdoc -skip qtrepotools -skip qtqa -skip qtsystems -skip qtdocgallery -skip qtpim -skip qtwayland -skip qtx11extras -skip qtmacextras -skip qtwinextras -skip qtenginio -skip webchannel -android-ndk-platform android-19
The process ended with no error but I don’t understand why, but when I create a new project in QtCreator using the quick control 1.3, the app is deployed but no button appears or the text fields are wrongly displayed (no text, weird fonts or no fonts at all).
I think the cause could be some error in the dependencies, since the output of the compilation contains:-- Appending dependency found by qmlimportscanner: /home/chili/Qt_source/qt-build-android/qtbase/qml/QtQml/StateMachine/plugins.qmltypes
-- Appending dependency found by qmlimportscanner: /home/chili/Qt_source/qt-build-android/qtbase/qml/QtQml/StateMachine/qmldir
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/SliderStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/CalendarStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ButtonStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ProgressBarStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/TextFieldStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/TabViewStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ComboBoxStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ScrollViewStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ToolBarStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/CheckBoxStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/RadioButtonStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/TableViewStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/GroupBoxStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/SwitchStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/CursorHandleStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ApplicationWindowStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/ToolButtonStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/BusyIndicatorStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/TextAreaStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles/Android/SpinBoxStyle.qml/drawables' as QML dependency
-- Skipping because file does not exist.
Warning: QML import could not be resolved in any of the import paths: HelperWidgets
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Controls/Styles' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs/Private' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs/DefaultFontDialog.qml/qml' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs/DefaultDialogWrapper.qml/qml' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/Qt/labs/folderlistmodel' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs/DefaultFileDialog.qml/qml' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs/DefaultMessageDialog.qml/qml' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs' as QML dependency
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtQuick/Dialogs/DefaultColorDialog.qml/qml' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/OpacityMask.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/Colorize.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/GaussianBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/RadialBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/RectangularGlow.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/RecursiveBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/ThresholdMask.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/InnerShadow.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/RadialGradient.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/ConicalGradient.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/ZoomBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/LevelAdjust.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/HueSaturation.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/FastBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/DirectionalBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/MaskedBlur.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/ColorOverlay.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/Blend.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/Glow.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/Displace.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/LinearGradient.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/GammaAdjust.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/BrightnessContrast.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/DropShadow.qml/private' as QML dependency
-- Skipping because file does not exist.
-- Adding '/home/chili/Qt_source/qt-build-android/qtbase/qml/QtGraphicalEffects/Desaturate.qml/private' as QML dependency
-- Skipping because file does not exist.I tried to recompile, clean everything but I’m running out of ideas. Any suggestions? Thanks!
-
I made a mistake in the qt5/qtbase/mkspecs/android-g++:
at line QMAKE_LIBS_PRIVATE I should have removed -lm