我正在将项目转换为Scala 2.11.4和sbt 0.13.7。我遇到了很多错误,其中一些是:
can't expand macros compiled by previous versions of Scala
[error] preloadDevice <<= preloadDeviceTask
代码:
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)
))
我该如何解决?
更新
JDK 8
答案 0 :(得分:3)
从这里开始:Why doesn't the Def.inputTask macro work in Scala 2.11.1?
在build.sbt文件中,请确保scalaVersion:=&#34; 2.10.4&#34;代替 像scalaVersion:=&#34; 2.11.x&#34;
如果您使用JDK 8,则对Scala 2.10.x编译的Sbt 0.13.x没有太多选项: