Android的 - 命令未找到 [英] Android - Command not found
问题描述
我试图运行在Ubuntu命令
I am trying to run the command in ubuntu
Android的更新项目--path。
android update project --path .
不过我得到一个机器人:命令未找到错误
我认为这是值得做的,我学会了在这里一天的路径?我只是想知道,是什么做的变量做我需要添加(安卓我假设),什么,我需要指出这一点。
I assume this is something to do with the path which i learnt on here the other day? I was just wondering, what do variable do i need to add (Android i assume) and what do i need to point it too.
亲切的问候
推荐答案
在MacOS / Linux中,定义的路径,无论你安装你的SDK为 ANDROID_HOME
:
On MacOS/Linux, define the path to wherever you installed your SDK as ANDROID_HOME
:
的MacOS
$ export ANDROID_HOME=/Applications/android-sdk-macosx
如果你安装了机器人工作室,该值将需要
If you installed Android Studio, the value will need to be
export ANDROID_HOME=$HOME/Library/Android/sdk
的Linux
$ export ANDROID_HOME=~/android-sdk-linux
然后将路径添加到平台工具
和工具
子目录(同在MacOS / Linux的)
Then add the paths to the platform-tools
and tools
sub-directories (Same on MacOS/Linux).
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
您现在应该能够运行机器人
从壳。
如果没有建议ANDROID_HOME路径以上是有效的,你可以找到通过(唯一和统一进行命名)平台工具文件夹:
If none of the suggested ANDROID_HOME paths above are valid, you can find the (uniquely and consistently named) platform-tools folder via:
find / -name platform-tools 2>/dev/null
无论返回将需要下调,以结束与路径,可能是 SDK
, Android的SDK-linux的
或 Android的SDK-的MacOSX
。
这篇关于Android的 - 命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!