如何在Mac系统中打开sdk管理器以下载android studio的缺失文件
答案 0 :(得分:15)
只需插入已安装的SDK路径,就像这样
cd /Users/<mac-user>/<path to sdk folder>/tools/bin && ./sdkmanager
<mac-user>
是您的MAC用户名
例如:
cd /Users/user/android-sdk-macosx/tools/bin && ./sdkmanager
OLD ANSWER
cd /Users/<mac-user>/<path to sdk folder>/tools && ./android
其中<mac-user>
是您的MAC用户名
例如在我自己的情况下,执行以下操作会为我打开SDK管理器
cd /Users/user/android-sdk-macosx/tools && ./android
答案 1 :(得分:5)
您可以在终端中打开SDK管理器:android -v
答案 2 :(得分:4)
./ android目前不可用。
不建议使用“ android”命令。对于手动SDK,AVD和项目 管理,请使用Android Studio。对于命令行工具,请使用 工具/ bin / sdkmanager和工具/ bin / avdmanager
admindeMacBook-Pro-3:sdk gongzelong$ cd tools/
admindeMacBook-Pro-3:tools gongzelong$ ./android
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Invalid or unsupported command ""
Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
admindeMacBook-Pro-3:tools gongzelong$ ./bin/sdkmanager
[=======================================] 100% Computing updates...
我们可以改用./SDK_HOME/tools/bin/sdkmanager
。
admindeMacBook-Pro-3:tools gongzelong$ ./bin/sdkmanager --help
Usage:
sdkmanager [--uninstall] [<common args>] [--package_file=<file>] [<packages>...]
sdkmanager --update [<common args>]
sdkmanager --list [<common args>]
sdkmanager --licenses [<common args>]
sdkmanager --version
With --install (optional), installs or updates packages.
By default, the listed packages are installed or (if already installed)
updated to the latest version.
With --uninstall, uninstall the listed packages.
<package> is a sdk-style path (e.g. "build-tools;23.0.0" or
"platforms;android-23").
<package-file> is a text file where each line is a sdk-style path
of a package to install or uninstall.
Multiple --package_file arguments may be specified in combination
with explicit paths.
With --update, all installed packages are updated to the latest version.
With --list, all installed and available packages are printed out.
With --licenses, show and offer the option to accept licenses for all
available packages that have not already been accepted.
With --version, prints the current version of sdkmanager.
Common Arguments:
--sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK
containing this tool
--channel=<channelId>: Include packages in channels up to <channelId>.
Common channels are:
0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).
--include_obsolete: With --list, show obsolete packages in the
package listing. With --update, update obsolete
packages as well as non-obsolete.
--no_https: Force all connections to use http rather than https.
--proxy=<http | socks>: Connect via a proxy of the given type.
--proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.
--proxy_port=<port #>: Proxy port to connect to.
--verbose: Enable verbose output.
* If the env var REPO_OS_OVERRIDE is set to "windows",
"macosx", or "linux", packages will be downloaded for that OS.
答案 3 :(得分:2)
它可以在Android Studio中找到。 看到这里......
答案 4 :(得分:1)
该主题为我指明了正确的方向,并希望此答案对像我这样的其他近期访客有帮助:
要访问 sdkmanager :
cd /Users/<mac-user>/<path to sdk folder>/tools/bin && ./sdkmanager
从那里开始,只需遵循文档,例如:
cd /Users/<mac-user>/<path to sdk folder>/tools/bin && ./sdkmanager --list
或
cd /Users/<mac-user>/<path to sdk folder>/tools/bin && ./sdkmanager --update
sdkmanager 文档:
https://developer.android.com/studio/command-line/sdkmanager.html
答案 5 :(得分:1)
只需转到Android Studio>工具> AVD管理器
并安装/创建您的模拟器
答案 6 :(得分:0)
我正在使用Android Studio 3.4.2
“ SDK管理器”未显示在“工具”菜单下,但在右上方菜单中作为图标提供。这是一个带有蓝色箭头指向下方的立方体。
答案 7 :(得分:0)
这不是直接的答案,但可能会帮助某人:当我已经在sdk/tools/bin
中安装了sdk管理器,但是sdkmanager
命令不起作用时,我已经在.bash_profile
中添加了以下几行它开始运作良好:
export ANDROID_SDK=$HOME/Library/Android/sdk
export PATH=$ANDROID_SDK/sdkmanager:$ANDROID_SDK/tools:$PATH
答案 8 :(得分:0)
我不知道您是否看到了这个,但我在库中发现了这些工具。
因此,转到文件管理器并使用 Cmd + Shift + 。或 Cmd +显示所有隐藏文件>
然后遵循以下路径:
/ Users / youruserDon'tforget / Library / Android / sdk / tools / bin
希望这会有所帮助。