Skip to content

Detect Android SDK using ANDROID_SDK_ROOT env var #5386

@pavi2410

Description

@pavi2410

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.0.7
  • Cross-platform modules:
  • Android Runtime:
  • iOS Runtime:
  • Plugin(s):

Describe the bug

On running the command ns doctor, I get this message

× The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.

However, I have the ANDROID_SDK_ROOT env var set which is equivalent to ANDROID_HOME.

To Reproduce

Run ns doctor

Expected behavior
I expected it to detect the Android SDK using the ANDROID_SDK_ROOT env var.

Sample project

Additional context

https://developer.android.com/studio/command-line/variables#envar

The ANDROID_HOME env var is deprecated. Refer to the link above.


Please guide me on how to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions