forked from qt-creator/qt-creator
Android: Update Android Stidio jdk detection
Fixes: QTCREATORBUG-28866 Fixes: QTCREATORBUG-30322 Change-Id: Id7908301a6c6acb540e6a7d575cc6b8b95cdf5d6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1479,9 +1479,12 @@ FilePath AndroidConfig::getJdkPath()
|
||||
// Look for Android Studio's jdk first
|
||||
const FilePath androidStudioSdkPath = androidStudioPath();
|
||||
if (!androidStudioSdkPath.isEmpty()) {
|
||||
const FilePath androidStudioSdkJrePath = androidStudioSdkPath / "jre";
|
||||
if (androidStudioSdkJrePath.exists())
|
||||
jdkHome = androidStudioSdkJrePath;
|
||||
const QStringList allVersions{"jbr", "jre"};
|
||||
for (const QString &version : allVersions) {
|
||||
const FilePath androidStudioSdkJbrPath = androidStudioSdkPath / version;
|
||||
if (androidStudioSdkJbrPath.exists())
|
||||
return androidStudioSdkJbrPath;
|
||||
}
|
||||
}
|
||||
|
||||
if (jdkHome.isEmpty()) {
|
||||
|
Reference in New Issue
Block a user