Android SDKpipe理器没有获取其他SDK平台

我下载了适用于Windows的SDK ADT软件包,一切正常,但Android SDK Manager显示错误

无法获取urlhttps://dl-ssl.google.com/android/repository/repository-7.xml ,原因:SSLPeerUnverified peer not authenticated

因为我想安装其他的android平台。

尝试使用“http”而不是“https”。 转到Android SDK Manager -> Tools -> Options...并选中"Force https://... sources to be fetched using http://..."

在这里输入图像说明

此外,您可以设置您的代理设置,如果有的话。

在Mac OS X中,解决scheme是在我们的用户.android文件夹中创build文件androidtool.cfg,然后添加这一行。 当然,它也适用于Linux

sdkman.force.http =真

我希望有帮助!

打开terminal,把这个:

 root@gl:/etc/ssl/certs/java# keytool -list -keystore cacerts Enter keystore password: [your pass] Keystore type: JKS Keystore provider: SUN Your keystore contains 0 entries 

注意:密钥库的默认密码是“changeit”。 修复:要正确构build具有所有可信CA证书的密钥库,请运行以下命令:

 root@gl:~# rm /etc/ssl/certs/java/cacerts root@gl:~# /var/lib/dpkg/info/ca-certificates-java.postinst configure 

你应该看到一长串添加的证书(* .pem),最后是一个“完成”。问题解决了。

在这里find这个。

这似乎是Ubuntu(也许是其他基于Debian的发行版)与Java CACerts密钥库的问题。 出于某种原因,这并不总是包含完整的条目列表。

要解决这个问题,请尝试以下操作:

  • 删除cacerts文件

    sudo rm /etc/ssl/certs/java/cacerts

  • 使用dpkg postinstall脚本重新构buildcacerts文件:

    sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure

这应该重新生成cacerts文件,问题应该解决。

如果强制http不起作用(就像我的情况一样),请尝试在选项菜单中清除或取消选中Manifest Cache。 这为我解决了

我是来自中国的用户。 强制使用http不适用于我。

我在SDK工具的选项中设置代理 ,这意外工作! 其实我已经在Internet选项中设置代理。 这不是单独工作。

所以我现在对中国用户的解决scheme如下(仅限Windows,Mac用户请自行试试):

  1. Internet选项中设置代理
  2. 设置Android SDK Manager的代理 工具 – 选项 – 代理设置。

————————— divider line for some complain —————— —–

所有这些都令人沮丧…

如果你在Mac OSX上,你仍然有错误。 只需从“系统偏好设置”中禁用您的代理设置,并通过上述方式之一设置SDK Manager中的代理。 重新启动您的SDKpipe理器,它会询问您的代理凭据。

我今天遇到了同样的问题,安装最后一个JDK并将环境variablesJAVA_HOME和JDK_HOME设置为C:\ Program Files \ Java \ jdk1.8.0_92(这是最后一个JDK的安装path),并且改变了PATH的JDK段解决了这个问题

在Linux上,您可以使用以下方法修复它:

  ./android update sdk --no-ui -s 

你也将得到提示:

  ./android update sdk --help inmyfree@INMYFREE:/usr/local/bin/android-sdk-linux/tools$ sudo ./android update sdk --help Error: Flag '--help' is not valid for 'update sdk'. Usage: android [global options] update sdk [action options] Global options: -s --silent : Silent mode, shows errors only. -v --verbose : Verbose mode, shows errors, warnings and all messages. --clear-cache: Clear the SDK Manager repository manifest cache. -h --help : Help on a specific command. Action "update sdk": Updates the SDK by suggesting new platforms to install if available. Options: -f --force : Forces replacement of a package or its parts, even if something has been modified. -n --dry-mode : Simulates the update but does not download or install anything. --proxy-host: HTTP/HTTPS proxy host (overrides settings if defined) -s --no-https : Uses HTTP instead of HTTPS (the default) for downloads. -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'. -u --no-ui : Updates from command-line (does not display the GUI) --proxy-port: HTTP/HTTPS proxy port (overrides settings if defined) -p --obsolete : Deprecated. Please use --all instead. -a --all : Includes all packages (such as obsolete and non-dependent ones.) 

我有与Ubuntu和OpenJDK相同的问题和解决方法与“强制HTTP”为我工作,但我认为这是从安全angular度不是最好的解决scheme,所以我寻找另一种方法来解决它:

问题是,在Java密钥库中,Google的颁发CA证书不知何故,这对SSL连接很重要。

要解决这个问题,首先要从谷歌网站https://pki.google.com下载谷歌的颁发CA证书。然后打开一个terminal并移到/ etc / ssl / certs / java

 cd /etc/ssl/certs/java/ 

在这个位置是Java密钥库。 该文件被称为“cacerts”。 现在,您必须使用此命令将以前下载的证书添加到密钥库

 sudo keytool -import -alias googleCA -file /yourdownloadlocation/GIAG2.crt -keystore cacerts 

如果您以前没有更改密码,密钥库的标准密码是“changeit”。 添加证书之后,您应该可以使用https来获取文件。