diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2021-09-28 11:18:37 +0200 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2021-09-30 12:27:59 +0200 |
commit | 44c8ae5543594011ab0d88ca784574c01312c68e (patch) | |
tree | f476d773f4bc46722a0accd2b6af91d51e5ceb01 /src/android | |
parent | 755f7c7ff275e269f698f1fe07820717b9771d43 (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.
Pick-to: 6.2
Task-number: QTBUG-80766
Task-number: QTBUG-96701
Change-Id: I4187e4a68d9e78e198152306a3e664c30c51ab18
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java | 12 |
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) |