【问题标题】:How to download Android sdk and set android_home path on Windows?如何在 Windows 上下载 Android sdk 并设置 android_home 路径?
【发布时间】:2016-03-07 20:09:58
【问题描述】:

当我从http://developer.android.com/sdk/index.html 下载时,我得到了 .exe 文件,但在设置路径时遇到了问题。如何在 Windows 上设置路径 ANDROID_HOME?当我构建离子应用程序时,出现以下错误

[Error: Android SDK not found. Make sure that it is installed. 
If it is not at the default location, set the ANDROID_HOME environment variable.]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2

You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2

【问题讨论】:

标签: android cordova sdk ionic-framework environment-variables


【解决方案1】:

对于窗户:

右键我的电脑->属性->高级系统设置->环境变量

现在在系统变量上编辑路径并附加在行尾:

;C:\yourSdkDirectoryLocation\tools;C:\yourSdkDirectoryLocation/platform-tools

Error: ANDROID_HOME is not set and "android" command not in your PATH on OS X

【讨论】:

  • 能否提供下载sdk目录的链接
【解决方案2】:

我不太确定您的错误,但如果您尝试更改 PATH 变量 (Windows) here 中的值,我将不胜感激有关您的问题的更多信息。

【讨论】:

  • 我已经使用 cli 下载了 ionic 项目,现在我正在尝试用它构建一个 apk。使用命令“ionic build --release android”时出现上述错误
猜你喜欢
  • 1970-01-01
  • 2015-11-09
  • 1970-01-01
  • 2015-02-08
  • 1970-01-01
  • 2018-10-16
  • 2013-11-05
  • 2015-05-26
  • 1970-01-01
相关资源
最近更新 更多