Android: Set debugger sysroot also for recent Ndk versions

Android debug support specifies the sysroot inside the used Ndk.

Recent Ndk versions have a different folder structure which moved the
sysroot location inside the Ndk to somewhere else. This change adds
finding the sysroot in the new directory layout in case it cannot be
found in the traditional location.

Instead of Ndk version checks, this code uses FilePath::exists to see if
the sysroot is valid.

Fixes: QTCREATORBUG-26814
Change-Id: I37db3043e405b83168d7c80c522d31bc148e458c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Alessandro Portale
2021-12-31 21:01:46 +01:00
parent 9cbf0904db
commit d087fe424d
2 changed files with 7 additions and 6 deletions

View File

@@ -881,7 +881,7 @@ bool AndroidConfig::isValidNdk(const QString &ndkLocation) const
const FilePath ndkPlatformsDir = ndkPath.pathAppended("platforms");
if (version.majorVersion() <= 22
&& (!ndkPlatformsDir.exists() || ndkPlatformsDir.toString().contains(' ')))
return false; // TODO: Adapt code that assumes the presence of a "platforms" folder
return false;
return true;
}