gradle: No cached version of org.scala-lang

ChildeMadeline 发布于6月前 阅读332次
0 条评论

在idea中使用gradle构建项目时总是提示失败,发现报错信息如下:

Warning:project ':common': Unable to build Scala project configuration
Details: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':common:scalaCompiler'.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.scala-lang:scala-compiler:2.11.8.
Required by:
    project :common
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: No cached version of org.scala-lang:scala-compiler:2.11.8 available for offline mode.

看了一下,关键是最后一行:

No cached version of org.scala-lang:scala-compiler:2.11.12 available for offline mode.

印象中并没有设置过离线模式。看了一下idea中gradle的设置,发现存在相关的默认设置“Offline work”。取消勾选“Offline work”就可以了。

依次打开如下菜单:

Settings -> Build.Execution,Deployment -> Build Tools –> Gradle

在Globle Gradle settings中有“Offline work”项,取消掉勾选就可以了。

#######

查看原文: gradle: No cached version of org.scala-lang

  • smallfrog
  • tinyleopard
  • orangebutterfly
  • heavykoala
  • ticklishladybug
  • beautifulsnake
  • goldenswan
需要 登录 后回复方可回复, 如果你还没有账号你可以 注册 一个帐号。