summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2021-09-28 11:18:37 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-30 13:06:31 +0000
commitd296f173af34c8a32cf536a42c7f70f8798e06b6 (patch)
treefe21be3d84b033a2e3d118e32e1ef8b3d5363c92 /src/android
parent10e06b485d8321e27a5bf1ed6931045309a2911f (diff)
Add error messages in case system library directory does not exist
On Android, when the system library directory does not exist, no error message was given. This led in turn to error messages like Can't find 'nulllibQt6Core_armeabi-v7a.so' which are not very helpful. Task-number: QTBUG-80766 Task-number: QTBUG-96701 Change-Id: I4187e4a68d9e78e198152306a3e664c30c51ab18 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 44c8ae5543594011ab0d88ca784574c01312c68e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java
index ef53e91bab..3724fa28bc 100644
--- a/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java
+++ b/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java
@@ -275,16 +275,24 @@ public abstract class QtLoader {
Log.e(QtApplication.QtTAG, "Using " + SYSTEM_LIB_PATH + " as default path");
}
File systemLibraryDir = new File(systemLibsPrefix);
- if (systemLibraryDir.exists() && systemLibraryDir.isDirectory() && systemLibraryDir.list().length > 0)
+ if (systemLibraryDir.exists() && systemLibraryDir.isDirectory() && systemLibraryDir.list().length > 0) {
libsDir = systemLibsPrefix;
+ } else {
+ Log.e(QtApplication.QtTAG,
+ "System library directory " + systemLibsPrefix
+ + " does not exist or is empty.");
+ }
} else {
String nativeLibraryPrefix = m_context.getApplicationInfo().nativeLibraryDir + "/";
File nativeLibraryDir = new File(nativeLibraryPrefix);
if (nativeLibraryDir.exists() && nativeLibraryDir.isDirectory() && nativeLibraryDir.list().length > 0) {
libsDir = nativeLibraryPrefix;
bundledLibsDir = nativeLibraryPrefix;
+ } else {
+ Log.e(QtApplication.QtTAG,
+ "Native library directory " + nativeLibraryPrefix
+ + " does not exist or is empty.");
}
-
}
if (apkDeployFromSystem && libsDir == null)