diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2023-03-14 23:32:03 +0200 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2023-03-20 11:05:20 +0000 |
commit | da273fed30428676cc48650d4018c7769ad38907 (patch) | |
tree | 378e57f6bb04647a66676133249504ccfb16f971 | |
parent | 34765aae27111d3a8db3b4cbd29f44e2bdc4fe7c (diff) |
Android: demistify the "No platform plugin" androiddeployqt error
Make the error message clearly mention that a Qt for Android app
require linking to Qt Gui library.
Along the way get rid of the libqtforandroidGL mention which
was valid when Qt for Android had separate plugins for raster
and opengl, which was removed some time ago in
8a9bd001c947e6888d37e99fc456339fd2b51b36.
Task-number: QTBUG-111933
Task-number: QTBUG-111934
Task-number: QTBUG-108643
Task-number: QTBUG-97636
Task-number: QTBUG-83997
Fixes: QTBUG-85544
Task-number: QTBUG-93185
Change-Id: I24f6c08f619d805e0d82758d35aebaf32038206c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a9c8870b5e6eddc31b78b7e4afe46b28110e7863)
-rw-r--r-- | src/tools/androiddeployqt/main.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index 515e8f2113..f455cdcf47 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -1422,15 +1422,9 @@ bool updateLibsXml(Options *options) if (localLibs.isEmpty()) { QString plugin; for (const QtDependency &qtDependency : options->qtDependencies[it.key()]) { - if (qtDependency.relativePath.endsWith(QLatin1String("libqtforandroid.so")) - || qtDependency.relativePath.endsWith(QLatin1String("libqtforandroidGL.so"))) { - if (!plugin.isEmpty() && plugin != qtDependency.relativePath) { - fprintf(stderr, "Both platform plugins libqtforandroid.so and libqtforandroidGL.so included in package. Please include only one.\n"); - return false; - } - + if (qtDependency.relativePath.endsWith(QLatin1String("libqtforandroid.so"))) plugin = qtDependency.relativePath; - } + if (qtDependency.relativePath.contains( QString::asprintf("libQt%dOpenGL", QT_VERSION_MAJOR)) || qtDependency.relativePath.contains( @@ -1442,7 +1436,8 @@ bool updateLibsXml(Options *options) if (plugin.isEmpty()) { fflush(stdout); - fprintf(stderr, "No platform plugin, neither libqtforandroid.so or libqtforandroidGL.so, included in package. Please include one.\n"); + fprintf(stderr, "No platform plugin (libqtforandroid.so) included in " + "the deployment. Make sure the app links to Qt Gui library.\n"); fflush(stderr); return false; } |