更新Android SDK时出错(org.xml.sax.SAXParseException)

时间:2016-03-17 21:31:05

标签: android android-sdk-tools circleci

我正在尝试使用此命令通过命令行更新sdk

echo y | android update sdk --no-ui --all --filter build-tools-23.0.2

我收到此错误

 echo y | android update sdk --no-ui --all --filter build-tools-23.0.2
Refresh Sources:
  Fetching https://dl.google.com/android/repository/addons_list-2.xml
  Validate XML
  Parse XML
  Fetched Add-ons List successfully
  Refresh Sources
  Fetching URL: https://dl.google.com/android/repository/repository-11.xml
  Validate XML: https://dl.google.com/android/repository/repository-11.xml
  XML verification failed for https://dl.google.com/android/repository/repository-11.xml.
Line 306:41, Error: org.xml.sax.SAXParseException; lineNumber: 306; columnNumber: 41; cvc-datatype-valid.1.2.1: '11b' is not a valid value for 'integer'.
  Fetching URL: https://dl.google.com/android/repository/addon.xml
  Validate XML: https://dl.google.com/android/repository/addon.xml
  Parse XML:    https://dl.google.com/android/repository/addon.xml
  Fetching URL: https://dl.google.com/android/repository/addon-6.xml
  Validate XML: https://dl.google.com/android/repository/addon-6.xml
  Parse XML:    https://dl.google.com/android/repository/addon-6.xml
  Fetching URL: https://dl-ssl.google.com/glass/gdk/addon.xml
  Validate XML: https://dl-ssl.google.com/glass/gdk/addon.xml
  Parse XML:    https://dl-ssl.google.com/glass/gdk/addon.xml
  Fetching URL: https://dl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl.google.com/android/repository/extras/intel/addon.xml
  Parse XML:    https://dl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
  Parse XML:    https://dl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Parse XML:    https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Parse XML:    https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Parse XML:    https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
  Validate XML: https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
  Parse XML:    https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
Refresh Sources:
  Fetching URL: https://dl.google.com/android/repository/repository-11.xml
  Validate XML: https://dl.google.com/android/repository/repository-11.xml
  XML verification failed for https://dl.google.com/android/repository/repository-11.xml.
Line 306:41, Error: org.xml.sax.SAXParseException; lineNumber: 306; columnNumber: 41; cvc-datatype-valid.1.2.1: '11b' is not a valid value for 'integer'.
Error: Ignoring unknown package filter 'build-tools-23.0.2'
Warning: The package filter removed all packages. There is nothing to install.
Please consider trying to update again without a package filter.

问题可能就在这里

Line 306:41, Error: org.xml.sax.SAXParseException; lineNumber: 306; columnNumber: 41; cvc-datatype-valid.1.2.1: '11b' is not a valid value for 'integer'.

这是在CircleCI框上运行的,它已经运行了好几天,直到现在。

任何人都知道发生了什么事?

提前致谢

1 个答案:

答案 0 :(得分:0)

有问题的XML版本为11.最新的版本似乎是12,我们的构建版本也回归正轨。有一会儿,Android团队似乎欺骗了我们。

尝试重建,但请注意,某些DNS等可能会导致您无法立即获得更新。