我剛剛將Android Studio升級到1.0RC4。我的一個Android的項目使用舊buildToolVersion
因此Android工作室建議我升級到19.1.0
但同時從Android Studio中下載此我收到以下錯誤:在下載Android SDK構建工具時,trustAnchors參數必須爲非空錯誤19.1
Loading SDK information...
Refresh Sources:
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Fetched Add-ons List successfully
Refresh Sources
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-10.xml, reason: SSL java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Refresh Sources:
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-10.xml, reason: SSL java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
There is nothing to install or update.
我看到了谷歌的幾個相關問題和SO但沒有相關的到Android Studio並且沒有解決方案爲我工作。
下面是詳細信息,關於我的環境
File -> Project Structure
Android SDK Location: /Applications/Android Studio.app/sdk
JDK Location: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
$ java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
$ /usr/libexec/java_home -V
Matching Java Virtual Machines (4):
1.8.0_25, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
1.7.0_07, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
1.6.0_35-b10-428, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home
1.6.0_35-b10-428, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
解決方案我已經試過:
cd $(/usr/libexec/java_home -v 1.7)/jre/lib/security
ln -fsh /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts
我重新啓動的Android Studio中的後上方,但同樣的問題仍然存在。
@EJP我看到了您在其他問題中發佈的答案,但該解決方案對我無效。我編輯了顯示我嘗試過的問題。 – Anthony 2014-12-06 13:01:11
正如我在重複問題中的答案所述,錯誤消息僅表示您沒有正確指定信任庫。您的問題中沒有任何與此相關的內容。 – EJP 2014-12-06 21:26:36
重複的http://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty/6788682#6788682 – EJP 2015-01-04 22:41:00