Android: fix some issues with jdk path detection

* There were two functions to detect jdk path, unified them.
* First try to find jdk 1.8, if not found, look for newer versions.
SDK Tools version 26.x needs jdk 1.8 however, the new cmdline-tools
can work with the newest jdk, so the UI will warn the user if the
selected jdk cannot run sdkmanager potentially because of the jdk
version.

Change-Id: Iee2c378598c26e8a9a8245262110ac20322a2d2b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-06-26 00:33:43 +03:00
parent ef9f57b5cb
commit b410def067
4 changed files with 68 additions and 159 deletions

View File

@@ -242,7 +242,7 @@ private:
mutable QReadWriteLock m_licenseInputLock;
public:
bool m_packageListingSuccessful = true;
bool m_packageListingSuccessful = false;
};
/*!
@@ -908,6 +908,7 @@ void AndroidSdkManagerPrivate::reloadSdkPackages()
clearPackages();
lastSdkManagerPath = m_config.sdkManagerToolPath();
m_packageListingSuccessful = false;
if (m_config.sdkToolsVersion().isNull()) {
// Configuration has invalid sdk path or corrupt installation.