You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android SDK Tools安装报错求助:Linux Mint下sdkmanager命令执行失败

Fixing SSLHandshakeException for Android SDK Manager on Linux Mint

Hey there, let's work through this SSL handshake error you're hitting when running sdkmanager --list. I've dealt with similar certificate headaches on Debian-based distros like Linux Mint before, so here are a few actionable fixes to try:

1. Update System CA Certificates

The most common culprit here is outdated or missing system root certificates. Let's refresh them first:

  • Run these commands to update and reinstall the CA certificates package:
    sudo apt update && sudo apt install --reinstall ca-certificates
    
  • Force the system to reconfigure all certificates:
    sudo update-ca-certificates -f
    
  • Now try running sdkmanager --list again to see if the error clears up.

2. Import System Certificates into Java's Trust Store

Sometimes system certificates are up to date, but Java's own trust store (cacerts) doesn't include them. Here's how to sync them:

  • First, find your Java installation path. Run this command to list available Java versions:
    update-alternatives --list java
    
    Example output might be /usr/lib/jvm/java-11-openjdk-amd64/bin/java — the cacerts file lives in the jre/lib/security subfolder of that path, so it would look like /usr/lib/jvm/java-11-openjdk-amd64/jre/lib/security/cacerts.
  • Copy the system CA bundle to a temporary file:
    sudo cp /etc/ssl/certs/ca-certificates.crt ~/system-ca.crt
    
  • Import this bundle into Java's trust store (the default password is changeit):
    sudo keytool -importcert -file ~/system-ca.crt -keystore /path/to/your/java/cacerts -storepass changeit -noprompt
    
    Replace /path/to/your/java/cacerts with the actual path you found earlier.
  • Clean up the temporary file:
    rm ~/system-ca.crt
    
  • Test the sdkmanager --list command again.

If you need a quick fix for testing (and understand the security risks), you can skip SSL verification:

sdkmanager --list --no-https --verbose

Note: This bypasses certificate checks, so only use this temporarily until you get the proper certificate setup working.

Additional Checks

  • Verify your Java version is compatible: Android SDK Manager works best with Java 8 or 11. Check with java -version and switch versions if needed using update-alternatives --config java.
  • If you're behind a proxy, make sure to pass proxy settings to sdkmanager:
    sdkmanager --list --proxy=http --proxy_host=your-proxy-address --proxy_port=your-proxy-port
    

内容的提问来源于stack exchange,提问作者Edy Silva

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:33:32