Commit 86ddde32 authored by Venugopal Shivashankar's avatar Venugopal Shivashankar Committed by Jani Heikkinen
Browse files

Doc: Update the getting started instructions for Android


The Android SDK installation experience has changed since
the latest release of SDK tools package. So the getting
started info. is restructured to accommodate this change.

Change-Id: I96d463e5e1584d8054feffca97ae9cf61695530a
Task-number: QTBUG-58591
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: default avatarVikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: default avatarTopi Reiniö <topi.reinio@qt.io>
Showing with 60 additions and 37 deletions
......@@ -140,40 +140,71 @@ The following topics provide more details about how to use Qt for Android:
\title Getting Started with Qt for Android
\brief Provides instructions to install and configure your development environment.
\section1 Requirements
\section1 Installing the Prerequisites
In order to use \l{Qt for Android}, you need the following:
\list
\li \l{http://developer.android.com/sdk/index.html}{The Android SDK Tools}
\note If your Qt version is earlier than v5.9, use the SDK tools package
v25.2.5 or earlier.
\li \l{http://developer.android.com/tools/sdk/ndk/index.html}{The Android NDK}
(recommended version 10e)
\li \l{http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html}{Java SE Development Kit} (JDK) v6 or later. You can also use \l{http://openjdk.java.net}{OpenJDK} on Linux.
\li On Windows, you need the following additional installations:
\list
\li \l{http://ant.apache.org/bindownload.cgi}{Apache Ant} v1.8 or later
\li Android Debug Bridge (ADB) driver on the Windows platform to enable USB
debugging. The default USB driver on Windows does not allow debugging.
For details about how to get the USB driver, see
\l{http://developer.android.com/sdk/win-usb.html}.
After installing the driver, try running a few basic
\l{http://developer.android.com/tools/help/adb.html}{adb} commands and
check whether your device responds to it.
\endlist
\li \l{http://ant.apache.org/bindownload.cgi}{Apache Ant} v1.8 or later
\endlist
After installing these tools, update the Android SDK to get the API
and tools packages required for development. You can update the SDK using the
\l{http://developer.android.com/tools/help/android.html}{android} tool that
comes with the SDK Tools package. For example, on Ubuntu the following command
starts the \l{http://developer.android.com/sdk/installing/adding-packages.html}
{Android SDK Manager}, which enables you to select the packages you want
to install:
After installing these tools, update the Android SDK by installing the API
and build tools packages required for development. You can install these packages
either through Android Studio or using the command line tools package you installed
earlier. For more details, refer to the
\l{https://developer.android.com/studio/intro/update.html}{Android Studio}
documentation.
\section2 Updating the Android SDK
The command line tools provided by the Android SDK Tools package also enables updating
the SDK, but without a GUI. For example, the following command on Ubuntu updates the SDK
by installing the latest \c build-tools, \c platform-tools, \c emulator, and \c patcher
packages:
\badcode
./android update sdk
\endcode
\note If you're developing on a 64-bit Linux machine, you must install the
To install a specific package, use \c sdkmanager from
\c{<ANDROID_SDK_ROOT>/tools/bin}. For example, the following command installs the
\c android-10 platforms package on Ubuntu:
\badcode
./sdkmanager "platforms;android-10"
\endcode
For more details, refer to the
\l{https://developer.android.com/studio/command-line/sdkmanager.html}{sdkmanager}
documentation.
\section1 Configuring Your Development Host
\section2 Windows
The default USB driver on Windows does not allow debugging using
Android Debug Bridge (ADB) tool. You must install the additional USB driver
provided by the \e extras Android SDK package. Use the following command from
the Windows command prompt to install the extras package:
\badcode
sdkmanager.bat "extras;google;usb_driver"
\endcode
After the package installation is complete, install the driver from
\c{<ANDROID_SDK_ROOT>/extras/google/usb_driver}. Try running a few basic
\l{http://developer.android.com/tools/help/adb.html}{adb} commands now
and check whether your Android device responds to it.
\section2 64-bit Linux
If you're developing on a 64-bit Linux machine, you must install the
following dependencies in order to run 32-bit executables like \c adb, which
allows Qt Creator to find devices to deploy to:
......@@ -187,26 +218,18 @@ To run the emulator, the following dependencies are also necessary:
sudo apt-get install libsdl1.2debian:i386
\endcode
\section1 Installing Qt for Android
The Qt 5 installers for different platforms are available from the \l Downloads
page. Choose the one that is appropriate.
\section2 Qt Creator IDE
Once you have the installer, follow these steps:
The Qt Creator IDE that came with the Qt 5 installation on your development
host, must be configured to enable developing applications for Android. Launch
Qt Creator and select \uicontrol Tools > \uicontrol Options >
\uicontrol Devices > \uicontrol Android to add the Android NDK and SDK paths.
For more details, refer to \l{Qt Creator: Connecting Android Devices}{Qt Creator Manual}.
\list 1
\li Run the installer to begin installing Qt 5 on your development platform.
\li Select the components you need in the \uicontrol{Select Components}
screen and click \uicontrol Next.
\li After the installation is complete, the installer lets you open Qt Creator
and the README. Select to open Qt Creator and click \uicontrol Finish.
\li Select \uicontrol{Tools > Options > Android} in Qt Creator to add
the Android NDK and SDK paths. For more details, see
\l{Qt Creator: Connecting Android Devices}{Qt Creator Manual}.
\endlist
\section1 Testing Your Setup
Now you can test your development setup by running the examples that came
with the Qt 5 package installed earlier. You can browse the examples in
with the Qt 5 installation. You can browse these examples in
Qt Creator \uicontrol Welcome mode. Use the \c android filter in the search
field to list all the examples tested on Android.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment