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

Dolphin版Android Studio导入Kotlin项目遇URISyntaxException异常

Android Studio Dolphin版本导入Kotlin项目构建失败解决办法

问题定位

构建失败的核心原因是仓库地址包含非法字符:https://maven .google.com中maven与.google.com之间多了一个空格,导致URI解析时触发语法异常。

解决步骤

  • 打开项目根目录下的**项目级build.gradle**文件(注意区别于app模块下的同名文件)
  • 定位到repositories代码块,找到包含错误地址的配置行
  • 将https://maven .google.com修改为正确的https://maven.google.com(或官方推荐的https://dl.google.com/dl/android/maven2/)
  • 保存文件后,点击Android Studio工具栏的「Sync Project with Gradle Files」按钮重新同步项目

错误日志参考

FAILURE: Build failed with an exception.

* What went wrong:
java.net.URISyntaxException: Illegal character in authority at index 8: https://maven .google.com
Illegal character in authority at index 8: https://maven .google.com

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
com.intellij.openapi.externalSystem.model.ExternalSystemException: java.net.URISyntaxException: Illegal character in authority at index 8: https://maven .google.com
Illegal character in authority at index 8: https://maven .google.com
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.addBuildModels(ProjectImportAction.java:346)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:127)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
    at 

* Get more help at https://help.gradle.org

BUILD FAILED in 24s

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.08 17:50:21