0
votes

Whenever I try to enable auto-import in IntelliJ it always gives me this error:

SBT 'mobile-aggregator' project refresh failed

Error:Error while importing SBT project:[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
See complete log in href="file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log">file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log

1
Is it possible to check the issue with newer IDEA and Scala plugin versions (2017.3.3 or 2017.3.4)?y.bedrov
I want to continue doing into these versions only, due to organisation constraints.Rehmanali Momin

1 Answers

0
votes

This happens quite a few times when your compiler / editor tries to use your cached project data. To fix this, perform the following steps:

  1. Exit IntelliJ & Delete .idea folder from the root project folder
  2. Delete target folder from root_project_folder\target & root_project_folder\project\target
  3. Make sure you have a valid name for your project name inside build.sbt. It should be in the following format: name := "projectname"
  4. Again start your intelliJ and reinitialize your project.

Hopefully, that should have solved your problem