如何在无头服务器上从命令行设置 Android sdk?

发布于 2024-08-29 21:35:30 字数 165 浏览 4 评论 0原文

到目前为止,我已经成功下载并安装了 SDK 并将其添加到我的 PATH 中。现在的问题是我无法运行“android update sdk”,因为它需要连接到显示器,并且我通过 ssh 连接到远程无头服务器(它是构建服务器,因此没有桌面环境)。 android 工具是否有一个命令行选项告诉它在没有 X 的情况下运行?

So far Ive managed to download and install the SDK and its in my PATH. Problem now is that I can't run "android update sdk" since it expects to be connected to a display and Im connected to a remote headless server through ssh (its a build server so there's no desktop env). Is there a command-line option for the android tool that tells it to run without X ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

顾忌 2024-09-05 21:35:30

有一个用于更新的 --no-ui 标志。

典型的 Linux 设置:

cd android-sdk-linux_86/tools
./android update sdk -u

这将无头运行。需要注意的是,-u--no-ui 是相同的标志

There is a --no-ui flag for the update.

Typical linux setup:

cd android-sdk-linux_86/tools
./android update sdk -u

This will run it headless. To note, -u and --no-ui are the same flag

机场等船 2024-09-05 21:35:30

我刚刚创建了一个小型命令行工具,可以在任何环境(GUI 或非 GUI)中进行更新。没有机会对其进行广泛的测试,但据我所知,它做了它应该做的事情。

该命令行工具使用所有当前可用的平台、附加组件、额外功能、文档、示例和工具更新预安装的基础 Android SDK。这对于构建服务器来说应该足够了(我需要这个来使用 Maven 安装 Hudson CI)。

请访问此处了解更多详细信息:

http://code.google.com/p/android -sdk工具

I just created a small command line tool that does the update in any environment (GUI or non-GUI). Didn't have the chance to test it extensively, but as far as I can tell it does what it should.

The command line tool updates a pre-installed base Android SDK with all currently available platforms, add-ons, extras, docs, samples and tools. This should be enough for a build server (I need this for my Hudson CI installation with Maven).

Please go here for more details:

http://code.google.com/p/android-sdk-tool

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文