Skip to content

Building Android version

Mishka edited this page Jun 29, 2018 · 1 revision

Building Android application

Cause https://bugreports.qt.io/browse/QTBUG-54666, use workaround, comment line with #

set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)

in Qt5CoreConfigExtras.cmake file

mkdir build_android
cd build_android
export CMAKE_PREFIX_PATH=<path to Qt Android CMake, like "/opt/Qt/5.9.2/android_armv7/lib/cmake">
export ANDROID_API_LEVEL=16 (or needed)
export ANDROID_COMPILER_VERSION=4.9
export JAVA_HOME=<path to java, like "/usr/lib/jvm/java-8-openjdk-amd64">
export ANDROID_SDK=<path to android SDK>
export ANDROID_NDK=<path to android NDK>
cmake .. -DCMAKE_TOOLCHAIN_FILE=`pwd`/../3rdparty/qt-android-cmake/toolchain/android.toolchain.cmake
make -j5
adb install -r ./bin/QtApp-debug.apk
Clone this wiki locally