如何通过终端打开Android SDK Manager?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24372664/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to open then the Android SDK Manager through the terminal?
提问by Ebad Saghar
I have CD'd into my android tools directory in the terminal. I tried typing 'android' and hitting enter and I also tried typing 'android sdk' and hitting enter but the sdk manager would not come up.
我已将 CD 放入终端中的 android 工具目录中。我尝试输入“android”并按回车键,我也尝试输入“android sdk”并按回车键,但 sdk 管理器不会出现。
Any solutions or advice to help me understand what I'm doing wrong?
任何解决方案或建议可以帮助我了解我做错了什么?
回答by jww
From outside the tools
directory (obviously, you need to change to suit your path taste):
从tools
目录外部(显然,您需要更改以适合您的路径口味):
$ sudo /opt/android-sdk-macosx/tools/android
From within the tools
directory (note the leading dot and slash):
从tools
目录中(注意前导点和斜线):
$ cd /opt/android-sdk-macosx/tools/
$ sudo ./android
Related: you should have both ANDROID_SDK_ROOT
and ANDROID_NDK_ROOT
set in your environment. ANDROID_SDK_ROOT
is used by the (now deprecated) ddms
program. ANDROID_NDK_ROOT
is used by various NDK tools. See Recommended NDK Directory?on the Android NDK user list.
相关:您应该在您的环境中同时拥有ANDROID_SDK_ROOT
和ANDROID_NDK_ROOT
设置。ANDROID_SDK_ROOT
由(现已弃用)ddms
程序使用。ANDROID_NDK_ROOT
被各种 NDK 工具使用。请参阅推荐的 NDK 目录?在 Android NDK 用户列表中。