就像两周前一样,一切都很完美,但突然之间twitter的依赖性开始导致一个错误。我什么都没变:
我的build.sbt文件:
name := "SparkStreamingProject"
version := "0.1"
scalaVersion := "2.12.12"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "3.0.0",
"org.apache.spark" %% "spark-sql" % "3.0.0",
"org.apache.spark" %% "spark-mllib" % "3.0.0",
"org.apache.spark" %% "spark-streaming" % "3.0.0",
"org.twitter4j" % "twitter4j-core" % "4.0.4",
"org.twitter4j" % "twitter4j-stream" % "4.0.4"
)
导入方式:
import org.apache.spark.streaming.twitter._
生成错误:
对象twitter不是org.apache.spark.streaming import org.apache.spark.streaming.twitter包的成员_
我需要更新我的配置文件吗?如何更新?
暂无答案!
目前还没有任何答案,快来回答吧!