我在SBT的想法IDE遇到了一個奇怪的錯誤,合併策略如下,如何解決思想IDE中有關sbt的錯誤?
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard
case m if m.startsWith("META-INF") => MergeStrategy.discard
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
case PathList("org", "apache", xs @ _*) => MergeStrategy.first
case PathList("org", "jboss", xs @ _*) => MergeStrategy.first
case "about.html" => MergeStrategy.rename
case "reference.conf" => MergeStrategy.concat
case _ => MergeStrategy.first
}
}
這似乎很好,但遺憾的是,IDE會一個錯誤,這是
Cannot resolve reference <<= with such signature
Type mismatch,expected:Def.Initialize[(String) => Plugin.MergeStrategy],
actual:Def.Initialize[Any].
任何人都可以向我解釋這個問題,請問如何解決這個問題?
它可以正常工作嗎?如果是,則忽略intellij想法錯誤。 –