igg*_*012 1 command-line android cordova
我通过此命令设置了指向Android SDK工具的路径:
# Cordova command line tools for Android SDK ----------------------
export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
Run Code Online (Sandbox Code Playgroud)
当我回应$ PATH时,这就是我得到的:
/Users/lorenzoignacio/.rvm/gems/ruby-2.0.0-p0/bin:/Users/lorenzoignacio/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/lorenzoignacio/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/lorenzoignacio/.rvm/bin:/usr/local/bin:/usr/local/heroku/bin:/usr/local/share/npm/bin:/Users/lorenzoignacio/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/go/bin:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
Run Code Online (Sandbox Code Playgroud)
如果你看一下它的结尾,你会看到我的路径:
/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
Run Code Online (Sandbox Code Playgroud)
然而,当我尝试运行时, cordova platform add android 我得到:
[Error: The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path. Output: /bin/sh: android: command not found]
Run Code Online (Sandbox Code Playgroud)
整个adt-bundle位于我的root用户目录中的一个名为的目录中Development.确切的路径是/Users/me/Development/adt-bundle/
我错过了什么?
我错过了什么?
你可能缺少两个~角色.
确切的路径是/ Users/me/Development/adt-bundle /
这不是你输入的内容PATH.你PATH说没有/Users/me- 相反,PATH期望你的卷根/Development目录中有一个目录.
现在,在Linux中,解决方案是添加一个~以指示它/Development与您的主目录相关:
export PATH=${PATH}:~/Development/adt-bundle/sdk/platform-tools:~/Development/adt-bundle/sdk/tools
Run Code Online (Sandbox Code Playgroud)
我的OS X shell体验很生疏,所以我忘记了是否~会映射到/Users/me.如果是,请使用~,否则,请使用:
export PATH=${PATH}:/Users/me/Development/adt-bundle/sdk/platform-tools:/Users/me/Development/adt-bundle/sdk/tools
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6096 次 |
| 最近记录: |