使用idea maven配置spark项目时遇到下面错误
Error:scalac: missing or invalid dependency detected while loading class file 'Tensor.class'.
Could not access term mllib in package org.apache.spark,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
A full rebuild may help if 'Tensor.class' was compiled against an incompatible version of org.apache.spark.
更改pom.xml spark-mllib依赖更改为如下内容
org.apache.spark
spark-mllib_2.11
2.3.1
<!-- runtime-->
注意,也就是注释掉
<!-- runtime-->
作者:learning_xin