NativeScript / NativeScript/nativescript-cli

Detect Android SDK using ANDROID_SDK_ROOT env var

未關閉
#5,386 7 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
1.1k
分支
204
平均合併
1 天 9 小時
30 天內合併 PR
8

描述

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.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

ns doctor 背後的實作及其 Android SDK 環境變數檢查開始;issue 未指定檔案或測試。在設定 ANDROID_SDK_ROOT 且不存在 ANDROID_HOME 的情況下驗證行為,並確認 ns doctor 能辨識 SDK 且不會發出警告。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
android, javascript
領域
cli
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。