How to setup Android sdk from command-line on headless server? [duplicate]

若如初见. 提交于 2019-12-21 07:15:03

问题


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 ?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2684296/how-to-setup-android-sdk-from-command-line-on-headless-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!