错误截图如下:

Error while importing sbt project:

List([info] Loading global plugins from C:\Users\RYJ\.sbt\1.0\plugins
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'Patterns(ivyPatterns=Vector(http://repo.typesafe.com/typesafe/ivy-releases/[organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=Vector(http://repo.typesafe.com/typesafe/ivy-releases/[organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false)'; switch to HTTPS or opt-in as Resolver.url("typesafe-ivy-releases", url(...)).withAllowInsecureProtocol(true)
[info] Loading project definition from F:\Code\Java\SbtObj\project
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'Patterns(ivyPatterns=Vector(http://repo.typesafe.com/typesafe/ivy-releases/[organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=Vector(http://repo.typesafe.com/typesafe/ivy-releases/[organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false)'; switch to HTTPS or opt-in as Resolver.url("typesafe-ivy-releases", url(...)).withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[info] Loading settings for project sbtobj from build.sbt ...
[info] Set current project to SbtObj (in build file:/F:/Code/Java/SbtObj/)
[info] sbt server started at local:sbt-server-74de12ff202df04b48d5
sbt:SbtObj>
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile and others.
[info] The new values will be used by cleanKeepGlobs
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to SbtObj (in build file:/F:/Code/Java/SbtObj/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from C:/Users/RYJ/.IntelliJIdea2019./config/plugins/Scala/repo/org.jetbrains/sbt-structure-extractor/scala_2./sbt_1./2018.2.+-88400d3f/jars/sbt-structure-extractor.jar
[info] Reapplying settings...
[info] Set current project to SbtObj (in build file:/F:/Code/Java/SbtObj/)
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://maven.aliyun.com/nexus/content/groups/public'; switch to HTTPS or opt-in as ("aliyun" at "http://maven.aliyun.com/nexus/content/groups/public").withAllowInsecureProtocol(true)
[error] stack trace is suppressed; run 'last update' for the full output
[error] stack trace is suppressed; run 'last ssExtractDependencies' for the full output
[error] (update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.13.1/scala-compiler-2.13.1.jar: wrong checksum: C:\Users\RYJ\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-compiler\2.13.1\scala-compiler-2.13.1.jar (expected SHA-1 2669fd1abfe2c76de9201174255f8454aa25c3e2 in C:\Users\RYJ\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-compiler\2.13.1\.scala-compiler-2.13.1.jar__sha1, got 1b073ccae686e76f296677dea625a1abd7e0eaac)
[error] (ssExtractDependencies) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.13.1/scala-compiler-2.13.1.jar: wrong checksum: C:\Users\RYJ\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-compiler\2.13.1\scala-compiler-2.13.1.jar (expected SHA-1 2669fd1abfe2c76de9201174255f8454aa25c3e2 in C:\Users\RYJ\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-compiler\2.13.1\.scala-compiler-2.13.1.jar__sha1, got 1b073ccae686e76f296677dea625a1abd7e0eaac)
[error] Total time: s, completed -- ::
[info] shutting down sbt server)

解决方案:

1.更换镜像为国内

由于墙的问题,需要把下载源改为国内镜像,上面截图是我改过的,如果你改过也不行,直接看解决方案2.。

在.sbt项目下 (.sbt项目可以在文件管理器中直接搜索,默认是在C:\Users\用户名\.sbt 下) 面创建repositories文件(注意不需要任何后缀),然后添加如下内容:

[repositories]
local
aliyun: http://maven.aliyun.com/nexus/content/groups/public
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots

其它不用动,重新右键Reimport sbt Project运行看看,可以看到镜像已经从阿里云下载了。 当然了,这步设置好可能还是报错,没事,看第二个解决方案。

2.降低软件包版本

上面还是报错很大原因推测是下载的文件不存在或者找不到导致的,有可能你安装的这个文件太新了,国内镜像库还没同步过来,国外又访问不了,所以降低版本就行了。

修改项目中的build.sbt文件,这里我因为是scala报错了,所以将 scalaVersion := "2.13.1" 改为 scalaVersion := "2.12.10", 然后保存,发现已经可以了。

最新文章

  1. 使用jquery中height()方法获取各种高度大全
  2. 【MySQL】MySQL复制表结构、表数据
  3. ssh localhost “Permission denied (publickey)
  4. div左右布局
  5. (五)JS学习笔记 - JQuery缓存机制
  6. js传参java接收乱码解决方案
  7. IT第九天 - 包、访问修饰符、变量的内存分配、String类中常用方法
  8. Git 常用命令手记 及 Github协同流程(转)
  9. 无废话WCF入门教程五[WCF的通信模式]
  10. 谈谈Backbone.js中的el
  11. noip普及组2007 Hanoi双塔问题
  12. Spark官方1 ---------Spark SQL和DataFrame指南(1.5.0)
  13. Maven文件配置
  14. 数据结构和算法总结(一):广度优先搜索BFS和深度优先搜索DFS
  15. vs code 的便捷使用
  16. C++面向对象程序设计之类和对象的特性
  17. 浅谈vue性能优化
  18. Java第一周作业
  19. python 跨域处理方式
  20. asp gridview

热门文章

  1. js数组中重复的对象去重
  2. 多线程的join功能
  3. Android空包签名
  4. 烘焙ID贴图
  5. Pycharm+PyQt5开发环境配置
  6. Java基础篇(02):特殊的String类,和相关扩展API
  7. 【,NetCore】WebApi使用统一时间格式
  8. 快速上手 Python 命令行模块 Click
  9. 日常破解--XCTF easy_apk
  10. 基于springcloud搭建项目-Hystrix篇(五)