install android sdk using command line linux

前端 未结 4 2011
时光说笑
时光说笑 2021-01-04 11:38

I want to download android sdk through command line. I got this command from command https://stackoverflow.com/a/4569792/563306 I downloaded Android SDK r18 tar file. extra

相关标签:
4条回答
  • 2021-01-04 12:05

    If you are using Android SDK Tools Rev 19 you should get

    $ android --help update sdk
    
           Usage:
           android [global options] update sdk [action options]
           Global options:
      -h --help    : Help on a specific command.
      -v --verbose : Verbose mode, shows errors, warnings and all messages.
      -s --silent  : Silent mode, shows errors only.
    
                         Action "update sdk":
      Updates the SDK by suggesting new platforms to install if available.
    Options:
         --proxy-port: HTTP/HTTPS proxy port (overrides settings if defined)
         --proxy-host: HTTP/HTTPS proxy host (overrides settings if defined)
      -s --no-https  : Uses HTTP instead of HTTPS (the default) for downloads.
      -a --all       : Includes all packages (such as obsolete and non-dependent
                       ones.)
      -f --force     : Forces replacement of a package or its parts, even if
                       something has been modified.
      -u --no-ui     : Updates from command-line (does not display the GUI)
      -p --obsolete  : Deprecated. Please use --all instead.
      -t --filter    : A filter that limits the update to the specified types of
                       packages in the form of a comma-separated list of
                       [platform, system-image, tool, platform-tool, doc, sample,
                       source]. This also accepts the identifiers returned by
                       'list sdk --extended'.
      -n --dry-mode  : Simulates the update but does not download or install
                       anything.
    

    and -u or --no-ui is one of the options.

    0 讨论(0)
  • 2021-01-04 12:06

    It works fine for me. Try it without the --no-ui flag and see if that works. If not, what is the error message you get?


    Edit:

    You probably have your PATH configured incorrectly. You need to execute the "current folder executable" as follows:

    $ ./android update sdk --no-ui
    
    0 讨论(0)
  • 2021-01-04 12:18

    Just to add. When you use the proxy options do not supply the http:// part. The android executable will not complain, and will report everything downloaded ok. I was on a completely new install and was sure nothing was downloaded yet.

    0 讨论(0)
  • 2021-01-04 12:23

    Its so simple:

    # ./android update sdk -u
    
    0 讨论(0)
提交回复
热议问题