Qt 5.1.1 for Android building by MinGW: Getting Embedded Linux instead of Android version
-
Hi all,
I'm trying to make Qt for Android under Windows 8 (x64) using this "manual":http://qt-project.org/wiki/building_qt-android_on_windows. The build works perfect but the result of this build is really strange. When I add the obtained qmake executable to the Qt Creator it say that "No compiler can produce code for this Qt version. Please define one or more compilers". I think this is because the version is "Qt version 5.1.1 for Embedded Linux", but should be "Qt version 5.1.1 for Android".The ABI is arm-linux-generic-elf-32bit, but should be arm-linux-android-elf-32bit.
How to fix the problem?Here is my configuration script:
@
set ANDROID_NDK_PLATFORM=android-18
set ANDROID_TARGET_ARCH=armeabi-v7a
set ANDROID_BUILD_TOOLS_REVISION=18.1.1
set ANDROID_NDK_HOST=windows-x86_64set PATH=D:\Qt\Qt5.1.1\Tools\mingw48_32\bin;C:\strawberry\perl\bin;C:\Program Files\Java\jdk1.7.0_21\bin
configure.bat -developer-build -platform win32-g++ -opengl es2 -xplatform android-g++ -android-ndk D:\android\android-ndk-r9 -android-sdk D:\android\android-sdk -android-toolchain-version 4.8 -opensource -confirm-license -nomake tests -nomake examples -D QT_COORD_TYPE=double
@Here is the details of result version:
Qt version 5.1.1 for Embedded Linux
@
Name: Qt 5.1.1 (Src)
ABI: arm-linux-generic-elf-32bit
Source: D:\Qt\Qt5.1.1\5.1.1\Src\qtbase
mkspec: android-g++
qmake: D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\bin\qmake.exe
Version: 5.1.1
QMAKE_SPEC win32-g++
QMAKE_VERSION 3.0
QMAKE_XSPEC android-g++
QT_HOST_BINS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\bin
QT_HOST_DATA D:\Qt\Qt5.1.1\5.1.1\Src\qtbase
QT_HOST_LIBS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\lib
QT_HOST_PREFIX D:\Qt\Qt5.1.1\5.1.1\Src\qtbase
QT_INSTALL_ARCHDATA D:\Qt\Qt5.1.1\5.1.1\Src\qtbase
QT_INSTALL_BINS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\bin
QT_INSTALL_CONFIGURATION
QT_INSTALL_DATA D:\Qt\Qt5.1.1\5.1.1\Src\qtbase
QT_INSTALL_DEMOS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\examples
QT_INSTALL_DOCS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\doc
QT_INSTALL_EXAMPLES D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\examples
QT_INSTALL_HEADERS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\include
QT_INSTALL_IMPORTS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\imports
QT_INSTALL_LIBEXECS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\bin
QT_INSTALL_LIBS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\lib
QT_INSTALL_PLUGINS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\plugins
QT_INSTALL_PREFIX D:\Qt\Qt5.1.1\5.1.1\Src\qtbase
QT_INSTALL_QML D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\qml
QT_INSTALL_TESTS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\tests
QT_INSTALL_TRANSLATIONS D:\Qt\Qt5.1.1\5.1.1\Src\qtbase\translations
QT_SYSROOT
QT_VERSION 5.1.1
@ -
Have you solved the problem? I get the same result on Linux.
-
Hi,
Just a shot in the dark but did you setup Qt Creator properly for Android ? There's an Android panel in the option dialog
Hope it helps
-
[quote author="strahlex" date="1385567834"]Have you solved the problem? I get the same result on Linux.[/quote]
For windows issue I've just copied qmake binary file from existing Qt MinGW distribution. So all Qt binaries was builded fine except qmake.
Under Linux I haven't got this problem.
Here is my configuration script for Linux:
@./configure -opensource -confirm-license -prefix $PWD/qtbase -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk $PWD/../android-ndk-r9 -android-sdk $PWD/../android-sdk-linux -android-ndk-host linux-x86_64 -android-toolchain-version 4.8 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -DQT_COORD_TYPE=double@And this is the build script:
@export ANDROID_BUILD_TOOLS_REVISION=18.1.1make -j
grep -c ^processor /proc/cpuinfo
make module-qtsvg-all -jgrep -c ^processor /proc/cpuinfo
make module-qtscripttools-all -jgrep -c ^processor /proc/cpuinfo
@Note that -j
grep -c ^processor /proc/cpuinfo
just sets the number of build threads you can omit it. -
geiliality!
[quote author="ZeAL0T" date="1385616053"][quote author="strahlex" date="1385567834"]Have you solved the problem? I get the same result on Linux.[/quote]
For windows issue I've just copied qmake binary file from existing Qt MinGW distribution. So all Qt binaries was builded fine except qmake.
Under Linux I haven't got this problem.
Here is my configuration script for Linux:
@./configure -opensource -confirm-license -prefix $PWD/qtbase -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk $PWD/../android-ndk-r9 -android-sdk $PWD/../android-sdk-linux -android-ndk-host linux-x86_64 -android-toolchain-version 4.8 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -DQT_COORD_TYPE=double@And this is the build script:
@export ANDROID_BUILD_TOOLS_REVISION=18.1.1make -j
grep -c ^processor /proc/cpuinfo
make module-qtsvg-all -jgrep -c ^processor /proc/cpuinfo
make module-qtscripttools-all -jgrep -c ^processor /proc/cpuinfo
@Note that -j
grep -c ^processor /proc/cpuinfo
just sets the number of build threads you can omit it.[/quote]