Android: Extend Android SDK sanity

Verify the essential tools and packages required for development

Task-number: QTCREATORBUG-18837
Change-Id: Ie89e8fcf3bf75f1db9cc5eac50859cf6f3e5fafd
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Vikas Pachdha
2017-09-04 14:54:50 +02:00
parent afc0192c8f
commit 27e740cab4
5 changed files with 53 additions and 33 deletions

View File

@@ -775,6 +775,17 @@ QVersionNumber AndroidConfig::sdkToolsVersion() const
return version;
}
QVersionNumber AndroidConfig::buildToolsVersion() const
{
QVersionNumber maxVersion;
Utils::FileName buildtoolsDir = m_sdkLocation;
buildtoolsDir.appendPath("build-tools");
QDir buildToolsDir(buildtoolsDir.toString());
for (const QFileInfo &file: buildToolsDir.entryList(QDir::Dirs|QDir::NoDotAndDotDot))
maxVersion = qMax(maxVersion, QVersionNumber::fromString(file.fileName()));
return maxVersion;
}
FileName AndroidConfig::ndkLocation() const
{
return m_ndkLocation;