错误截图如下:

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", 然后保存,发现已经可以了。

Error while importing sbt project:--创建sbt项目导入文件出错的更多相关文章

  1. [转]ADT中通过DDMS导入文件出错ddms transfer error: Read-only file system,Failed to push selection: Read-only file system

    [已解决] 原文  http://www.crifan.com/ddms_import_file_error_transfer_error_read_only_file_system/ 想要通过adt ...

  2. 命令行创建Maven项目卡住以及出错解决办法。

    第一次通过命令行创建maven项目.结果,果不其然啊,还是出问题了,不过出问题比没有出问题强,知道哪里有问题并学会解决也是一种收获. 遇到的第一个问题,在从仓库下载东西的时候会卡住,我开始以为是网速问 ...

  3. MyEclipse下创建的项目导入到Eclipse中详细的图文配置方法

    一.情景再现. 有些人比较喜欢用Myeclipse开发,有些人却比较喜欢用eclipse开发.但是其中有一个问题,Myeclipse里面的项目导入的时候出现了一个小小的问题. 如下: 二.说明问题 导 ...

  4. MyEclipse下创建的项目 导入eclipse

    1.导入在MyEclipse下创建的项目 2.把项目变成Web项目,在项目上右键-->Properties-->选择Project Facets-->点击Convert to fac ...

  5. Eclipse和MyEclipse使用技巧--MyEclipse下创建的项目导入到Eclipse中详细的图文配置方法

    一.情景再现. 有些人比较喜欢用Myeclipse开发,有些人却比较喜欢用eclipse开发.但是其中有一个问题,Myeclipse里面的项目导入的时候出现了一个小小的问题. 如下: 二.说明问题 导 ...

  6. 【maven】maven创建web项目-pom文件提示web.xml is missing and <failOnMissingWebXml> is set to true

    使用maven创建web项目,选择war类型后,pom文件红叉 提示web.xml is missing and <failOnMissingWebXml> is set to true ...

  7. javaweb项目导入myecplise出错

    项目导入出错:移动项目的时候.classpath .project不要删 build path -> use for source floder 把某一文件夹当作源码文件夹 bulid path ...

  8. vs 2019 create new project 创建新项目

    下面的place solution and project in the same directory 不需要勾选

  9. mvn 创建的项目 导入到eclipse

    首先,我的工具版本如下: jdk: java version "1.6.0_10-rc2"; maven: apache-maven-3.1.0; eclipse: MyEclip ...

随机推荐

  1. 聊聊H5与JS近几年的黑科技

    聊聊H5与JS近几年的黑科技 自ajax技术的诞生,编程界兴起了一股WEB开发热,facebook,Twitter等众多大佬级企业都在网页应用上大放异彩,这十年我们见证了前端技术的崛起.这期间产生了众 ...

  2. 关于JavaScript中的基本类型

    1.在JavaScript的数据中包含以下两种 1 基本类型 Number.Boolean.String.NULL.Undefined 以及ES6的 Symbol 2 引用类型 Object.Arra ...

  3. Servlet+JSP 对外访问路径配置

    servlet类似 servlet配置为: <servlet>    <servlet-name>Demo01_OutWrite</servlet-name>    ...

  4. 一下午简单写个搭建Flutter开发环境,dome跑起来!

    1.下载flutter包由于需要翻墙,国内下载会出现问题,所有需要先配置一下用户环境变量. export PUB_HOSTED_URL=https://pub.flutter-io.cn export ...

  5. Apache虚拟机的配置文件解说

    1.为了方便管理虚拟主机,我决定使用一种方法,那就是修改httpd-vhosts.conf文件. 第一步首先要使扩展文件httpd-vhosts.conf生效: 1. 打开 apache/conf/h ...

  6. 多方论战!市场到底看重VR哪些特质

    VR即Virtual Reality的缩写,中文译为"虚拟现实".近年来,VR的概念不断升温,三星.谷歌.微软.索尼.HTC等互联网巨头纷纷杀入VR市场,甚至催生出许多商业神话.  ...

  7. Mac系列萎靡 大棒能否敲醒苹果?

    大棒能否敲醒苹果?" title="Mac系列萎靡 大棒能否敲醒苹果?">     iPhone在智能手机市场中的一骑绝尘,不断将苹果推向神坛位置.即使新品更新幅度 ...

  8. JavaScript 設計模型 - Iterator

    Iterator Pattern是一個很重要也很簡單的Pattern:迭代器!我們可以提供一個統一入口的迭代器,Client只需要知道有哪些方法,或是有哪些Concrete Iterator,並不需要 ...

  9. cpupower frequency 无法设置userspace的问题

    Disable intel_pstate in grub configure file: $ sudo vi /etc/default/grub Append "intel_pstate=d ...

  10. iOS 使用系统的UITabBarController 修改展示的图片大小

    1. 设置TabBarItem图片的大小 1 - (void)configurationAppTabBarAndNavigationBar { // 选中的item普通状态图片的大小 UIImage ...