Skip to content

Use android tools from ANDROID_HOME #1164

@rosen-vladimirov

Description

@rosen-vladimirov

CLI has strange requirement for adding <android_sdk>/tools and <android_sdk>/platform-tools to your PATH. Also ANDROID_HOME must be set in order to be able to build for Android. We should remove the requirement for adding these directories to PATH and use everything based on the value of ANDROID_HOME. This will improve the Getting Started experience for Android development as you will have to install Android SDK and set your ANDROID_HOME. Everything should work fine after that.

Implementation details:

  • Remove requirement to have <android-sdk>/tools and <android-sdk>/platform-tools directories to your PATH - use them based on ANDROID_HOME variable.
  • Based on the above point - replace all calls to android directly with correct path to the android executable.
  • Remove requirement for JAVA added in your PATH - validate it by using JAVA_HOME.
  • Improve error messages when ANDROID_HOME is not set - for example warning about missing compile SDK will inform you in case ANDROID_HOME is not set.
  • Improve ANDROID_HOME checks - validate that directories like "extras", "tools", "platform-tools" exist (at least on of them).
  • Validate JAVA version in doctor command.
  • Sometimes build-tools directories are not called with version(22.0.1), but have the name: build-tools-22.0.1 - make sure we will be able to use such dirs
  • Skip cocoapods warnings on Linux and Windows (for tns doctor command).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions