NativeScript / NativeScript/nativescript-cli
Detect Android SDK using ANDROID_SDK_ROOT env var
还没有人认领这个 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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