QT 5.4.1 for Android Windows environment setup

Source: Internet
Author: User

QT 5.4.1 for Android WindowsEnvironment Construction

2015-5-13

Directory

First, reference article:

Second, prepare the software:

Third, install the prepared software:

Iv. Configuring Qt 5.4.1 for Android

V. Resolve Creator Qt Quick simulation layer has crashed

Vi. Solution without kit selection( kit )

Vii. Resolve compilation Error: The system cannot find the file specified

Eight, Friendship tips:

First, reference article:

1. Windows Qt5.1 for Android development environment Configuration

Http://www.cnblogs.com/rophie/p/3226543.html

2. Creator Qt Quick simulation layer has crashed

Http://www.qtcn.org/bbs/simple/?t58504.html

3. Qt Development environment Download and installation

Http://wenku.baidu.com/view/4e7d7f415a8102d276a22f88

Second, prepare the software:

1. Qt 5.4.1 for Android (Windows 32-bit, 939 MB) (info):

http://www.qt.io/download-open-source/#section-2

2. NDK:http://developer.android.com/tools/sdk/ndk/index.html

3. SDK:http://developer.android.com/sdk/installing/index.html

4. JDK:http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html

5. Ant:http://ant.apache.org/bindownload.cgi

Third, install the prepared software:

1. Qt 5.4.1 for Android:

Note that when selecting components to select these functions, experience tells me to choose, because we have to use. :)

2. Install JDK: This part does not explain, go to the Internet to find it yourself. :)

3. Install SDK: Personal feeling is just an decompression process, like the installation of the appearance;

4. Extract the ndk,ant.

Iv. ConfigurationQt 5.4.1 for Android

Run your own QT Creator, and choose "Tools"and"Options"in the menu-->android, configured as follows:

V. SettlementCreator Qt QuickThe simulation layer has crashed

1. read the reference article 2 link content;

2. download the latest version of:Qt Creator 3.4.0 for Windows (in megabytes) (info)

http://www.qt.io/download-open-source/#section-2

3. Install Qt Creator 3.4.0 after running, prompt missing python2.7 library file, if there is no prompt,

In the subsequent operation of the time will also prompt;

3. since the Qt Creator 3.4.0 version requires NDK support to provide additional functionality, additional downloads for the patch under the corresponding platform are required:

http://download.qt.io/official_releases/gdb/

4. unzip the patch package, and the original ndk in the folder comparison, the corresponding items into the corresponding folder;

Vi. Settlement of NoKit Selection(Build Kit(Kit))

1. mainly because QT Creator did not detect The cause of qmake.exe, so we need to configure ourselves, the following is my The Qmake.exe path , as you can see, is related to the previously installed build:

1. D:\QT\install\5.4\android_armv5\bin\qmake.exe

2. D:\QT\install\5.4\android_armv7\bin\qmake.exe

3. D:\QT\install\5.4\mingw491_32\bin\qmake.exe

2. Configuration

3. View the kit selection ( kit) :

The observation of the phenomenon in the graph shows that we can only use the 4.9 version of the compiler,thendk has a lot of looks, as if we can only use the 4.9 version of:

Vii. Resolve compilation Error: The system cannot find the file specified

1. error message:

d:\ndk\android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/Windows/bin/arm-linux-androideabi-g++ -c -wno-psabi -march=armv5te -mtune=xscale - msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums - Dandroid -wa,--noexecstack -fno-builtin-memmove -std=gnu++0x -g -g -gdwarf-2  -marm -o0 -fno-omit-frame-pointer -wall -wno-psabi -w -d_reentrant - Fpie -dqt_qml_debug -dqt_declarative_debug -dqt_quick_lib -dqt_widgets_lib -dqt_gui_ Lib -dqt_qml_lib -dqt_network_lib -dqt_core_lib -i. \helloworld -i. -id:\qt\install\5.4\android_armv5\include -id:\qt\install\5.4\android_armv5\ Include\qtquick -id:\qt\install\5.4\android_armv5\include\qtwidgets -id:\qt\install\5.4\android_ Armv5\include\qtgui -id:\qt\install\5.4\android_armv5\include\qtqml -id:\qt\install\5.4\android_ Armv5\include\qtnetwork -id:\qt\install\5.4\android_armv5\include\qtcorE -i. -id:\ndk\android-ndk-r10d\sources\cxx-stl\gnu-libstdc++\4.9\include -id:\ndk\ Android-ndk-r10d\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi\include -id:\ndk\android-ndk-r10d\ Platforms\android-9\arch-arm\usr\include -id:\qt\install\5.4\android_armv5\mkspecs\android-g++ -o  MAIN.OBJ&NBSP, .... \helloworld\main.cpp

Makefile:798:recipe for Target ' main.obj ' failed

Process_begin:createprocess (NULL, d:\ndk\android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/Windows/bin/arm-linux-androideabi-g++ -c -wno-psabi -march=armv5te -mtune=xscale - msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums - Dandroid -wa,--noexecstack -fno-builtin-memmove -std=gnu++0x -g -g -gdwarf-2  -marm -o0 -fno-omit-frame-pointer -wall -wno-psabi -w -d_reentrant - Fpie -dqt_qml_debug -dqt_declarative_debug -dqt_quick_lib -dqt_widgets_lib -dqt_gui_ Lib -dqt_qml_lib -dqt_network_lib -dqt_core_lib -i. \helloworld -i. -id:\qt\install\5.4\android_armv5\include -id:\qt\install\5.4\android_armv5\ Include\qtquick -id:\qt\install\5.4\android_armv5\include\qtwidgets -id:\qt\install\5.4\android_ Armv5\include\qtgui -id:\qt\install\5.4\android_armv5\include\qtqml -id:\qt\install\5.4\android_ Armv5\include\qtnetwork -id:\qt\install\5.4\android_armv5\include\qtcorE -i. -id:\ndk\android-ndk-r10d\sources\cxx-stl\gnu-libstdc++\4.9\include -id:\ndk\ Android-ndk-r10d\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi\include -id:\ndk\android-ndk-r10d\ Platforms\android-9\arch-arm\usr\include -id:\qt\install\5.4\android_armv5\mkspecs\android-g++ -o  MAIN.OBJ&NBSP, .... \HELLOWORLD\MAIN.CPP,&NBSP, ...)  failed.

Make (e=2): The system cannot find the file specified.

Mingw32-make: * * * [main.obj] Error 2

14:45:10: process "D:\QT\install\Tools\mingw491_32\bin\mingw32-make.exe" exit, exit code 2 .

Error while Building/deploying project HelloWorld (kit:android for Armeabi (GCC 4.9, Qt 5.4.1))

When executing step ' make '

2. Observe the red directory above to confirm the existence of the directory;

3. Solution:

By viewing <of yourNDKroot directory>/toolchains/arm-linux-androideabi-4.9/prebuilt/(My directory: d:\ndk\android-ndk-r10d/toolchains/ arm-linux-androideabi-4.9/prebuilt/) Discover WindowsCatalogueDoes not exist, the result is onlywindows-x86_64, so witty and foolish a copy of thewindows-x86_64and re -nameWindows, in the compilation,Pass, generateapk, and deployed to thei.mx6go up.。:)

4. so we can know by analysis,< your ndk root directory >/toolchains The directory contains all the compilers, and if we choose a different version of the compiler, we might be able to solve this in a similar way.

Eight, Friendship tips:

1. From the kit selection in the project we created , we can find that by default we can only use arm-linux-androideabi-4.9 The compilation environment;

2. from the final compilation error message, the solution can be seen:

        ndk directory, that is use Qt creator  3.4.0 with qt for android 5.4.1 do android development , need to use 64 bit computer, but we downloaded qt 5.4.1 for android  (Windows &NBSP;32-BIT,&NBSP;939&NBSP;MB)   (info), suddenly let a person a bit confused, so no matter how, it is recommended to use 64 32 :)

3. In fact, we select other compilers through the manual setup in Kit selection( kit ) , and if there is a compilation error in seven, Please review the corresponding compilation requirements directory to consider the solution above without error.

QT 5.4.1 for Android Windows environment setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.