Ubuntu under Qt's Android environment configuration various bug collection

Source: Internet
Author: User

The preparation materials are:

1.

Qt for Android 5.x version, as below, you can choose a suitable version of your machine model to download.

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

2.

JDK Download and Environment configuration

Address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

environment variable settings:

0 "

Execute the following command to extract the JDK package to the specified path.

$ sudo MKDIR/USR/LIB/JVM

$ sudo tar-c/usr/lib/jvm-xzf jdk-7u55-linux-x64.tar.gz

1 "

sudo gedit./.BASHRC

2 "

In the Open Text editor, add the following lines:

Export java_home=/usr/lib/jvm/jdk1.8.0_31
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH

Note: In these lines, you only need to modify the path in the first row, and the path is the path to the JDK you previously unzipped.

Test method:

Java-version

3

Android SDK Download

: http://www.cnblogs.com/bjzhanghao/archive/2012/11/14/android-platform-sdk-download-mirror.html

Find the ADT bundle that corresponds to your machine model download.

Then extract it to a directory.

4

Android NDK Download

: http://www.cnblogs.com/yaotong/archive/2011/01/25/1943615.html

Also unzip to a directory.

It is important to note that the NDK is required to configure the environment variables, or QT can not find the error yo.

sudo gedit ~/.BASHRC

At the end of the text editor, add the following sentence:

ndk=/home/arikes/android/android-ndk-r10d
Export NDK

5

Ant Installation

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

Also download it directly and unzip it to a directory.

You can also install directly from the command.

sudo apt-get install ant

Test method:

Ant-version

6

ADB installation

Direct command Installation

sudo apt-get install adb

Test method: ADB devices

Once you have finished installing the material, you are ready to install QT.

Note Download QT if Qt for Android.

menu, choose Tools----Options----Android

After setting the appropriate path, the Android configuration for Qt is complete.

Occasionally there are some errors, by the way:

If the NDK environment variable is not set, it will be wrong in the packaging times.

Also, because it is a manually configured Android package path, sometimes qtcreator cannot find the platform in the Android package. Sometimes because you can not find the version of the error, here just set up the Android version. Locations such as:

Ubuntu under Qt's Android environment configuration various bug collection

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.