我有这个问题:
Android SDK installation issue - Peer not authenticated
我正在尝试安装Android SDK,但是出现以下错误 在SDK Manager日志中 -
Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: peer not authenticated Fetched Add-ons List successfully Fetching URL: https://dl-ssl.google.com/android/repository/repository-5.xml Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-5.xml, reason: peer not authenticated Done loading packages.
我不是代理人,我在那里发现的所有回复以及其他类似的问题都是:
启用“强制https:// ...使用提取源 http:// ...“在SDK Manager工具>选项菜单中设置。
但我没有使用GUI进行CentOS 6安装(它是一个持续集成服务器)。
从命令行运行时如何强制或设置此配置?
编辑:我还检查过可以使用wget下载文件:
wget https://dl.google.com/android/repository/repository-11.xml
答案 0 :(得分:2)
这可不容易,我不知道我是怎么错过的(-‸ლ):
./android list sdk --no-ui --no-https
--no-https
选项可以解决问题。它在操作的帮助部分中描述:
$ ./android --help list sdk
Usage:
android [global options] list sdk [action options]
Global options:
-h --help : Help on a specific command.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-s --silent : Silent mode, shows errors only.
Action "list sdk":
Lists remote SDK repository.
Options:
-o --obsolete : Deprecated. Please use --all instead.
-a --all : Lists all available packages (including obsolete and
installed ones)
--proxy-host: HTTP/HTTPS proxy host (overrides settings if defined)
--proxy-port: HTTP/HTTPS proxy port (overrides settings if defined)
-s --no-https : Uses HTTP instead of HTTPS (the default) for downloads.
-e --extended : Displays extended details on each package
-u --no-ui : Displays list result on console (no GUI) [Default: true]