Solved Compile Qt source for Android
-
Ubuntu 10.04 x64
Qt Source 5.12.2./configure -xplatform android-g++ -android-ndk-platform android-16 -android-ndk ~/.android/ndk/android-ndk-r17c -android-sdk ~/.android/sdk -android-arch armeabi-v7a -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -platform linux-g++-64 -release
ERROR: The OpenGL functionality tests failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
How to compile Qt source for Android?
-
Hi,
You should use the recommend NDK version matching your Qt release. For Qt 5.12 its the r19. See the Android Getting Started guide in Qt's documentation.
-
I did as you said (I downloaded the latest version of ndk-r19c, sdk, openjdk-11).
Now a new error:
sh: 1: /home/es/.android/ndk/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++: not found Project ERROR: Cannot run target compiler '/home/es/.android/ndk/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++'. Output: =================== =================== Maybe you forgot to setup the environment?
I sloved it by using "android-clang" instad of "android-g++" as guide said.
Thank you .