@@ -255,6 +255,12 @@ Library that helps identifying if the environment can be used for development of
255255 */
256256 isCocoaPodsUpdateRequired(): Promise<boolean>;
257257
258+ /**
259+ * Checks if the Android SDK Tools are installed and configured correctly.
260+ * @return {Promise<boolean>} true if the Android SDK Tools are installed and configured correctly.
261+ */
262+ isAndroidSdkConfiguredCorrectly(): Promise<boolean>;
263+
258264 /**
259265 * Returns the whole system information.
260266 * @return {Promise<ISysInfoData>} The system information.
@@ -409,6 +415,12 @@ Library that helps identifying if the environment can be used for development of
409415 * true if the system requires xcproj to build projects successfully and the CocoaPods version is not compatible with the Xcode.
410416 */
411417 isCocoaPodsUpdateRequired: boolean;
418+
419+ /**
420+ * true if the Android SDK Tools are installed and configured correctly.
421+ * @type {boolean}
422+ */
423+ isAndroidSdkConfiguredCorrectly: boolean;
412424 }
413425
414426 /**
@@ -427,6 +439,91 @@ Library that helps identifying if the environment can be used for development of
427439 }
428440 ```
429441
442+ * Module ` androidToolsInfo ` :
443+ - Usage:
444+ ```TypeScript
445+ import { androidToolsInfo } from "nativescript-doctor"
446+
447+ function main() {
448+ console.log("path to adb from android home: ", await androidToolsInfo.getPathToAdbFromAndroidHome());
449+ console.log("path to emulator executable: ", androidToolsInfo.getPathToEmulatorExecutable());
450+ console.log("android tools info: ", androidToolsInfo.getToolsInfo());
451+ console.log("ANROID_HOME validation errors: ", await androidToolsInfo.validateAndroidHomeEnvVariable());
452+ console.log("android tools info validation errors: ", await androidToolsInfo.validateInfo());
453+ console.log("javac validation errors: ", await androidToolsInfo.validateJavacVersion(await sysInfo.getJavaCompilerVersion()));
454+ }
455+
456+ main();
457+ ```
458+ - Interfaces:
459+ /**
460+ * Describes methods for getting and validating Android tools.
461+ */
462+ interface IAndroidToolsInfo {
463+ /**
464+ * Returns the Android tools info.
465+ * @return {NativeScriptDoctor.IAndroidToolsInfoData} returns the Android tools info.
466+ */
467+ getToolsInfo(): NativeScriptDoctor.IAndroidToolsInfoData;
468+
469+ /**
470+ * Checks if the Android tools are valid.
471+ * @return {NativeScriptDoctor.IWarning[]} An array of errors from the validation checks. If there are no errors will return [].
472+ */
473+ validateInfo(): NativeScriptDoctor.IWarning[];
474+
475+ /**
476+ * Checks if the current javac version is valid.
477+ * @param {string} installedJavaVersion The version of javac to check.
478+ * @return {NativeScriptDoctor.IWarning[]} An array of errors from the validation checks. If there are no errors will return [].
479+ */
480+ validateJavacVersion(installedJavaVersion: string): NativeScriptDoctor.IWarning[];
481+
482+ /**
483+ * Returns the path to the adb which is located in ANDROID_HOME.
484+ * @return {Promise<string>} Path to the adb which is located in ANDROID_HOME.
485+ */
486+ getPathToAdbFromAndroidHome(): Promise<string>;
487+
488+ /**
489+ * Checks if the ANDROID_HOME variable is set to the correct folder.
490+ * @return {NativeScriptDoctor.IWarning[]} An array of errors from the validation checks. If there are no errors will return [].
491+ */
492+ validateAndroidHomeEnvVariable(): NativeScriptDoctor.IWarning[];
493+
494+ /**
495+ * Returns the path to the emulator executable.
496+ * @return {string} The path to the emulator executable.
497+ */
498+ getPathToEmulatorExecutable(): string;
499+ }
500+
501+ /**
502+ * Describes information about installed Android tools and SDKs.
503+ */
504+ interface IAndroidToolsInfoData {
505+ /**
506+ * The value of ANDROID_HOME environment variable.
507+ */
508+ androidHomeEnvVar: string;
509+
510+ /**
511+ * The latest installed version of Android Build Tools that satisfies CLI's requirements.
512+ */
513+ buildToolsVersion: string;
514+
515+ /**
516+ * The latest installed version of Android SDK that satisfies CLI's requirements.
517+ */
518+ compileSdkVersion: number;
519+
520+ /**
521+ * The latest installed version of Android Support Repository that satisfies CLI's requirements.
522+ */
523+ supportRepositoryVersion: string;
524+ }
525+ ```
526+
430527* Module ` constants ` :
431528 - Usage:
432529 ```TypeScript
0 commit comments