Reputation: 34884
I'm converting a project to Scala 2.11.4 and sbt 0.13.7. I got a lot of errors, some of them are:
can't expand macros compiled by previous versions of Scala
[error] preloadDevice <<= preloadDeviceTask
for this code:
lazy val settings: Seq[Setting[_]] = inConfig(Android) (Seq(
// Preload Scala on the device/emulator
preloadDevice <<= preloadDeviceTask,
preloadEmulator <<= InputTask(
(sdkPath)(AndroidProject.installedAvds(_)))(preloadEmulatorTask),
// Uninstall previously preloaded Scala
unloadDevice <<= unloadDeviceTask,
unloadEmulator <<= InputTask(
(sdkPath)(AndroidProject.installedAvds(_)))(unloadEmulatorTask)
))
How do I fix it?
UPDATE:
JDK 8
Upvotes: 2
Views: 4860
Reputation: 22374
From here: Why doesn't the Def.inputTask macro work in Scala 2.11.1?
In your build.sbt file, make sure you scalaVersion := "2.10.4" instead of something like scalaVersion := "2.11.x"
If you use JDK 8, there is not too much options as Sbt 0.13.x compiled against Scala 2.10.x:
Upvotes: 3