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

@@ -196,6 +196,7 @@ public:
Utils::FilePath openSslLocation() const;
void setOpenSslLocation(const Utils::FilePath &openSslLocation);
static Utils::FilePath getJdkPath();
private:
static QString getDeviceProperty(const Utils::FilePath &adbToolPath,