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

Android Studio Giraffe启动时Kotlin编译器构件下载失败求解

解决Android Studio Giraffe无法下载Kotlin Compiler Maven构件的问题
  • 强制切换到内置Bundled版本
    直接进入File | Settings | Build, Execution, Deployment | Compiler | Kotlin Compiler,把Kotlin Compiler version改成Bundled,应用设置后重启IDE。手动指定版本号会触发远程构件下载,内置版本无需依赖Maven仓库,能直接规避下载失败问题。

  • 校验项目gradle配置中的Kotlin版本
    打开项目根目录的build.gradle文件,检查Kotlin插件版本是否和IDE设置一致,示例配置如下:

    buildscript {
        ext.kotlin_version = "1.8.20"
        dependencies {
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        }
    }
    

    若版本不匹配,修改为和内置版本对应的号,同步项目后重启IDE。

  • 清理IDE缓存与本地Maven残留文件

    1. 通过File | Invalidate Caches...选择Invalidate and Restart,彻底清理IDE缓存。
    2. 找到本地Maven仓库路径(通常是~/.m2/repository/org/jetbrains/kotlin),删除kotlin-dist-for-jps-meta相关的文件夹,再重启IDE尝试重新下载(如果需要使用指定版本的话)。
  • 检查网络与代理设置
    进入File | Settings | Appearance & Behavior | System Settings | HTTP Proxy,确认代理配置能正常访问Maven仓库。如果是企业内网环境,可在Settings | Build, Execution, Deployment | Build Tools | Maven | Repositories中添加内部镜像仓库,替换默认仓库地址。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.12 10:20:56