qtdoc/doc/src/platforms/android/android.qdoc

300 lines
10 KiB
Plaintext
Raw Normal View History

Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page android.html
\title Qt for Android
\brief Provides information about Android support in Qt.
\ingroup supportedplatform
\nextpage android-getting-started.html
Qt for Android enables you to develop Qt applications for Android devices,
and supports a wide range of features and use-cases.
To start your Qt for Android application, download and install Qt for Android
and use the Qt Creator IDE, follow the instructions on the
\l{Getting Started with Qt for Android} page.
If you have an existing Android application try Qt's \l{\QtTAS}{plugin}
for Google's Android Studio. Find it on the IntelliJ marketplace to download.
The plugin allows you use the \l{Qt Quick View Android Class} to add
Qt Quick content to your Android app as a
\l{https://developer.android.com/reference/android/view/View}{view}.
To build Qt from source, see
\l{Qt for Android - Building from Source}{Building from Source}.
\target android-supported-configurations
\section1 Supported Configurations
\include supported-platforms.qdocinc android
\table 50%
\header \li {4,1} Target Devices used in Automated Testing
\header \li Device \li OS Version \li Architecture \li Form Factor
\row \li \l{Pixel 2}
\li Android 11 (API 30)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 2 XL}
\li Android 11 (API 30)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 4}
\li Android 10 (API 29)
\li armv7
\li Mobile
\row \li \l{Pixel 4A}
\li Android 12 (API 31)
\li armv7, arm64_v8a
\li Mobile
\row \li \l{Pixel 6}
\li Android 13 (API 33)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 6 Pro}
\li Android 12 (API 31)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 6a}
\li Android 14 (API 34)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 7}
\li Android 13 (API 33)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 7 Pro}
\li Android 13 (API 33)
\li arm64_v8a
\li Mobile
\row \li \l{Pixel 7a}
\li Android 14 (API 34)
\li arm64_v8a
\li Mobile
\row \li \l{Samsung Galaxy S10}
\li Android 9 (API 28)
\li armv7, arm64_v8a
\li Mobile
\row \li \l{Samsung Galaxy S21}
\li Android 12 (API 31)
\li armv7, arm64_v8a
\li Mobile
\row \li \l{Samsung Galaxy Tab S4}
\li Android 10 (API 29)
\li armv7, arm64_v8a
\li Tablet
\row \li \l{Nothing Phone 1}
\li Android 14 [UP1A.231005.007] (API 34)
\li arm64_v8a
\li Mobile
\row \li \l{Motorola Moto G5 Plus}
\li Android 8 [UP1A.230519.001] (API 27)
\li arm64_v8a
\li Mobile
\endtable
\note Qt for Android support is inclusive of \b{but not limited to} these devices.
\note The above table is accurate at the time of this Qt patch release only.
It may change during the patch release cycle and should only be used as a
reference for what the Qt Company can rapidly reproduce bugs on.
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
To learn about developing with Qt for Android, here are the main topics
to check:
\list
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\li \l {Getting Started with Qt for Android}
\li \l {Deploying an Application on Android}
\li \l {How Qt for Android Works}
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\li \l {Qt for Android - Building from Source}{Building Qt for Android from Source}
\li \l {Building Qt for Android Projects from Command Line}
\li \l {The androiddeployqt Tool}
\li \l {Qt Android Manifest File Configuration}
\endlist
The following topics also provide more details about Qt for Android:
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\annotatedlist android-platform-extra-topics
Qt's vibrant and active \l{https://www.qt.io/developers}{community site}
houses a wiki, a forum, and additional learning guides and presentations.
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
For information about licensing, check \l {Android GNU C++ Run-time Licensing}.
\section1 Where to Go from Here
We invite you to explore the rest of Qt. We prepared overviews which help
you decide which APIs to use and our examples demonstrate how to use our
APIs.
\list
\li \l{Qt Overviews} - list of topics about application development
\li \l{Qt Examples and Tutorials}{Examples and Tutorials} - code samples and tutorials
\li \l{Qt Reference Pages} - a listing of C++ and QML APIs
\li \l{Qt Creator: Creating a Mobile Application}
\li \l{Qt Creator: Specifying Android Device Settings}
\endlist
*/
/*!
\page android-getting-started.html
\title Getting Started with Qt for Android
\brief Provides instructions to install and configure your development environment.
\previouspage android.html
\nextpage android-how-it-works.html
The video below is a beginner's guide to using the Qt for Android toolchain,
including the Qt Creator IDE, to get you started developing Android apps.
\youtube 5OiIqFTjUZI
To learn the basics of getting started with Qt for Android, take the
\l {https://www.qt.io/academy/course-catalog#getting-started-with-qt-for-android-}
{Getting Started with Qt for Android} course in Qt Academy.
The rest of this page has more detailed getting started information.
To download and install Qt for Android, follow the instructions on the
\l{Getting Started with Qt} page.
\section1 Android Development Prerequisites
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
In order to develop with \l{Qt for Android}, you will need the following
prerequisites:
\list
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\li \l {Java Development Kit (JDK)}
\li \l {Android: Android command line tools}{Android Command Line Tools}
which includes:
\list
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\li \l{Android: The Android NDK}{Android NDK}: for building C++ code.
\li \l{Android: Android SDK Platforms}{Android SDK Platform} and
\l{Android: Android SDK Build Tools}{Android SDK Build Tools}: for building
Android apps for specific API version.
\li \l{Android: Android SDK Platform Tools}{Android SDK Platform Tools}:
for deploying and managing Android dependencies.
\endlist
\endlist
The easiest way to manage these dependencies is by using Qt Creator's built in
Android development setup. For more information, see
\l{Qt Creator: Specifying Android Device Settings}.
\section2 Manually Installing the Prerequisites
If you prefer to manually install the prerequisites please follow
these next steps.
\section3 Java Development Kit (JDK)
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Qt for Android development requires JDK \JdkVer or above, provided by any of the
following supported distributions:
\list
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\li \l{Adoptium}
\li \l{OpenJDK}
\li \l{Java SE Development Kit}
\endlist
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Install your preferred JDK. If your installer doesn't set the
\c JAVA_HOME environment variable that points to the location of
the installed JDK, you can set it manually. For example on Linux:
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\badcode \JdkVer
sudo apt-get install openjdk-\1-jdk
export JAVA_HOME=/usr/lib/jvm/java-\1-openjdk-amd64
\endcode
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Or on \macOS:
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\badcode \JdkVer
brew install openjdk@\1
sudo ln -sfn "$(brew --prefix openjdk@\1)/libexec/openjdk.jdk" \
"/Library/Java/JavaVirtualMachines/openjdk-\1.jdk"
export JAVA_HOME="$(/usr/libexec/java_home -v \1)"
\endcode
\section3 Android SDK Command Line Tools
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Download the latest version of the
\l{Android: Android command line tools}{Android SDK Command Line Tools}
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
for your operating system and extract it to the appropriate path as stated below.
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
//! [Android SDK Paths]
The Android SDK is commonly installed by Qt Creator or Android Studio
in the following locations:
\list
\li Linux: ~/Android/Sdk/
\li \macos: ~/Library/Android/sdk/
\li Windows: C:\\Users\\<USER>\\AppData\\Local\\Android\\Sdk\\
\endlist
//! [Android SDK Paths]
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Or use your OS's package manager, for example for \macOS:
\badcode
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
brew install android-commandlinetool
\endcode
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\section3 Android SDK Mandatory Packages
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Make sure to install the SDK Platform, Platform Tools, and Build Tools.
For Qt \QtVer, use:
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\badcode \AndroidPlatformVer \AndroidBuildToolsVer
sdkmanager "platform-tools" "platforms;android-\1" "build-tools;\2"
\endcode
\section3 Android NDK
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
Qt \QtVer uses NDK \NdkFullVer, you can install it by running:
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\badcode \NdkFullVer
sdkmanager "ndk;\1"
\endcode
For example for \macOS:
\section3 Emulator
If you wish to use the \l{Android: Android Emulator}{Android Emulator},
you can install it by running:
\badcode
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
sdkmanager "emulator" "patcher;v4"
\endcode
\section3 Platform Specific Configurations
\section4 Windows
The default USB driver on Windows does not allow debugging using
Android Debug Bridge (ADB) tool. You must install the additional USB driver
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
provided by the \e extras Android SDK package. Install it by running the following:
\badcode
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
sdkmanager.bat "extras;google;usb_driver"
\endcode
\section4 Linux
The following dependencies are needed for using tools such as \c adb or \c gdb which
can be used by Qt Creator:
\badcode
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
sudo apt-get install libstdc++6 libncurses5
\endcode
\target emulator dependencies
To run the Android emulator, the following dependencies are also necessary:
Android: update the docs and remove outdated or misleading parts I noticed many parts of the Android docs are still mentioning outdated or straight wrong information or in other cases, lots of duplicated information. This is an attempt to remedy that all at once. What's included in this patch: * Extend the supported platforms table to include relevant information like JDK, Gradle and AGP versions (this needs the following patch 46c1414c3bc782f128b24480d5c8367eeb58157b). * In getting started or building Qt pages, made the dependencies tools version more dynamic using the macros to have less manual maintenance. * Removed unneeded or redundant steps in gettings started and building Qt pages to have the page more lightweight and straight to the point. * In deployment page, re-wrote the page to more efficiently go through the relevant parts that a user would want to know about developing, extending and deploying a Qt Android app. * Added missing info about Gradle, Gradle wrapper and AGP. * use \annotedlist to collection CMake variables/properties to dynamically add new values instead of having to do it manually. * Convert the Android environment variable list to a table which is better formatted. * The main Android page had an \annotatedlist with all pages, but the pages were scattered and it's not easy to know which are the most relevant pages for someone new, so I moved the most important pages outside of the annoted list. * Added CMake snippets or command or prioritized them over qmake in relevant places. * Refactored many pages to avoid duplication and add links to the same information instead. * In OpenSSL page, prioritize using the pre-built libs over building them manually, since that's what most users would end up doing. * In publishing to the store, added parts about using CMake multi-abi feature. * In 3rdparty page, added parts about include shared libraries and not only jar dependencies as it was. * In platforms notes, removed or moved many parts that were mentioned elsewhere many times already. * Moved 'Where to Go from Here' section in main page to end as it makes sense to go through the Android specific parts and then go elsewhere only after that. Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I05e73f4a6af216b73b3892b0ec3b1b25174ff0b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-16 01:14:08 +00:00
\section3 Testing the Setup
Now you can test your development setup by running the examples shipped with the
Qt installation. For more information, see
\l[Qt Examples And Tutorials]{Mobile}{Mobile Examples}.
To develop a simple application from scratch, see
\l {Qt Creator: Creating a Mobile Application}.
*/