如何在无头服务器上从命令行设置 Android sdk?
到目前为止,我已经成功下载并安装了 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一个用于更新的
--no-ui
标志。典型的 Linux 设置:
这将无头运行。需要注意的是,
-u
和--no-ui
是相同的标志There is a
--no-ui
flag for the update.Typical linux setup:
This will run it headless. To note,
-u
and--no-ui
are the same flag我刚刚创建了一个小型命令行工具,可以在任何环境(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