[关闭]
@act262 2017-01-22T04:23:28.000000Z 字数 2748 阅读 1654

Android命令行更新SDK

Android_SDK

打开Android SDK Manager图形界面

  1. android sdk

获取sdk列表信息:得到数字序号filterNum

  1. android list sdk

更新指定版本的sdk: -u 无界面(在无桌面环境的*unix系统下常用到)

  1. android updaet sdk -u -t filterNum
  2. android update sdk -u -t 7

  1. C:\Users\Admin>android help
  2. Error: Expected verb after global parameters but found 'help' instead.
  3. Usage:
  4. android [global options] action [action options]
  5. Global options:
  6. -s --silent : Silent mode, shows errors only.
  7. -v --verbose : Verbose mode, shows errors, warnings and all messages.
  8. --clear-cache: Clear the SDK Manager repository manifest cache.
  9. -h --help : Help on a specific command.
  10. Valid
  11. actions
  12. are
  13. composed
  14. of a verb
  15. and an
  16. optional
  17. direct
  18. object:
  19. - sdk : Displays the SDK Manager window.
  20. - avd : Displays the AVD Manager window.
  21. - list : Lists existing targets or virtual devices.
  22. - list avd : Lists existing Android Virtual Devices.
  23. - list target : Lists existing targets.
  24. - list device : Lists existing devices.
  25. - list sdk : Lists remote SDK repository.
  26. - create avd : Creates a new Android Virtual Device.
  27. - move avd : Moves or renames an Android Virtual Device.
  28. - delete avd : Deletes an Android Virtual Device.
  29. - update avd : Updates an Android Virtual Device to match the folders
  30. of a new SDK.
  31. - create project : Creates a new Android project.
  32. - update project : Updates an Android project (must already have an
  33. AndroidManifest.xml).
  34. - create test-project : Creates a new Android project for a test package.
  35. - update test-project : Updates the Android project for a test package (must
  36. already have an AndroidManifest.xml).
  37. - create lib-project : Creates a new Android library project.
  38. - update lib-project : Updates an Android library project (must already have
  39. an AndroidManifest.xml).
  40. - create uitest-project: Creates a new UI test project.
  41. - update adb : Updates adb to support the USB devices declared in the
  42. SDK add-ons.
  43. - update sdk : Updates the SDK by suggesting new platforms to install
  44. if available.
  45. C:\Users\Admin>android update sdk -help
  46. Error: Flag '-help' is not valid for 'update sdk'.
  47. Usage:
  48. android [global options] update sdk [action options]
  49. Global options:
  50. -s --silent : Silent mode, shows errors only.
  51. -v --verbose : Verbose mode, shows errors, warnings and all messages.
  52. --clear-cache: Clear the SDK Manager repository manifest cache.
  53. -h --help : Help on a specific command.
  54. Action "update sdk":
  55. Updates the SDK by suggesting new platforms to install if available.
  56. Options:
  57. -f --force : Forces replacement of a package or its parts, even if
  58. something has been modified.
  59. -n --dry-mode : Simulates the update but does not download or install
  60. anything.
  61. --proxy-host: HTTP/HTTPS proxy host (overrides settings if defined)
  62. -s --no-https : Uses HTTP instead of HTTPS (the default) for downloads.
  63. -t --filter : A filter that limits the update to the specified types of
  64. packages in the form of a comma-separated list of
  65. [platform, system-image, tool, platform-tool, doc, sample,
  66. source]. This also accepts the identifiers returned by
  67. 'list sdk --extended'.
  68. -u --no-ui : Updates from command-line (does not display the GUI)
  69. --proxy-port: HTTP/HTTPS proxy port (overrides settings if defined)
  70. -p --obsolete : Deprecated. Please use --all instead.
  71. -a --all : Includes all packages (such as obsolete and non-dependent
  72. ones.)
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注