How to install Android SDK on Linux using CLI only

2019-03-23 21:14发布

问题:

I'm setting up an auto build server, and need to install an Android SDK. I'm working over SSH, of course. But tools/android update sdk wants to start a Java GUI. Any other way to install an SDK?

回答1:

If you use tools/android -h update sdk (I discovered that by trying tools/android update sdk --help), you will get a list of options for the update sdk command, the most interesting one being:

  -u --no-ui    Updates from command-line (does not display the GUI)


回答2:

tools/android update sdk --no-ui



回答3:

If workwing behind a proxy consider using options:

 --proxy-port: HTTP/HTTPS proxy port (overrides settings if defined)

 --proxy-host: HTTP/HTTPS proxy host (overrides settings if defined)