不多说,直接上干货!

  

 问题详情

  当出现这类错误时是由于版本不匹配造成的

Information:// : - Compilation completed with  errors and  warnings in 3s 910ms
Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version
expected: 5.0
found: 4.1 in JUnit4.class
Error:scalac: error while loading ConsoleRunner, Scala signature ConsoleRunner has wrong version
expected: 5.0
found: 4.1 in ConsoleRunner.class
Error:scalac: error while loading Specification, Scala signature Specification has wrong version
expected: 5.0
found: 4.1 in Specification.class
D:\Code\IntelliJIDEACode\HadoopSparkMllibAction\src\test\scala\zhouls\bigdata\MySpec.scala
Error:(, ) illegal inheritance;
self-type zhouls.bigdata.MySpecTest does not conform to org.specs.runner.JUnit4's selftype org.specs.runner.JUnit4
class MySpecTest extends JUnit4(MySpec)
^
Error:(, ) org.specs.runner.JUnit4 does not have a constructor
class MySpecTest extends JUnit4(MySpec)
^
Error:(, ) illegal inheritance;
self-type zhouls.bigdata.MySpecRunner.type does not conform to org.specs.runner.ConsoleRunner's selftype org.specs.runner.ConsoleRunner
object MySpecRunner extends ConsoleRunner(MySpec)
^
Error:(, ) org.specs.runner.ConsoleRunner does not have a constructor
object MySpecRunner extends ConsoleRunner(MySpec)
^
Error:(, ) illegal inheritance;
self-type zhouls.bigdata.MySpec.type does not conform to org.specs.Specification's selftype org.specs.Specification
object MySpec extends Specification {
^
Error:(, ) org.specs.Specification does not have a constructor
object MySpec extends Specification {
^
Error:(, ) value should is not a member of String
"This wonderful system" should {
^

解决办法

  如果你想快速运行的话,就用idea建立的maven项目生成的几个test类和对象注释掉,或者删除掉即可运行。

  然后,运行即可。

  当然,上面的这种方法不是最彻底的。

  File  -> settings ->  Editor -> plugins -> junit

IDEA里运行代码时出现Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class错误的解决办法(图文详解)的更多相关文章

  1. Scala Error: error while loading Suite, Scala signature Suite has wrong version expected: 5.0 found: 4.1 in Suite.class

    准备给scala项目引入单元测试 <dependency> <groupId>org.scalatest</groupId> <artifactId>s ...

  2. IDEA里运行代码时出现Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger的解决办法(图文详解)

    不多说,直接上干货! 问题详情 运行出现log4j的问题 -classpath "C:\Program Files\Java\jdk1.8.0_66\jre\lib\charsets.jar ...

  3. PHP生成页面二维码解决办法?详解

    随着科技的进步,二维码应用领域越来越广泛,今天我给大家分享下如何使用PHP生成二维码,以及如何生成中间带LOGO图像的二维码. 具体工具: phpqrcode.php内库:这个文件可以到网上下载,如果 ...

  4. Elasticsearch集群状态健康值处于red状态问题分析与解决(图文详解)

      问题详情 我的es集群,开启后,都好久了,一直报red状态??? 问题分析 有两个分片数据好像丢了.   不知道你这数据怎么丢的. 确认下本地到底还有没有,本地要是确认没了,那数据就丢了,删除索引 ...

  5. 对于maven创建spark项目的pom.xml配置文件(图文详解)

    不多说,直接上干货! http://mvnrepository.com/ 这里,怎么创建,见 Spark编程环境搭建(基于Intellij IDEA的Ultimate版本)(包含Java和Scala版 ...

  6. 如何用R来处理数据表的长宽转换(图文详解)

    不多说,直接上干货! 很多地方都需用到这个知识点,比如Tableau里.   通常可以采取如python 和 r来作为数据处理的前期. Tableau学习系列之Tableau如何通过数据透视表方式读取 ...

  7. VMware下OSSIM 5.2.0的下载、安装和初步使用(图文详解)

    不多说,直接上干货! 入门阶段不建议选用最新的版本. 采用OSSIM 4.11 到 OSSIM5.0.3 之间任何版本做实验,sensor的状态都会是“V”.   建议,入门,采用OSSIM5.0.0 ...

  8. 如何用Python来处理数据表的长宽转换(图文详解)

    不多说,直接上干货! 很多地方都需用到这个知识点,比如Tableau里.   通常可以采取如python 和 r来作为数据处理的前期. Tableau学习系列之Tableau如何通过数据透视表方式读取 ...

  9. IDEA里运行程序时出现Error:scalac:error while loading JUnit4 , Scala signature JUnit4 has wrong version错误的解决办法(图文详解)

    不多说,直接上干货! 问题详情 当我们在运行程序时,出现Error:scalac:error while loading JUnit4 , Scala signature JUnit4 has wro ...

随机推荐

  1. CodeForces 343D water tree(树链剖分)

    Mad scientist Mike has constructed a rooted tree, which consists of n vertices. Each vertex is a res ...

  2. CentOS7安装confluenceWIKI并破解汉化

    关闭防火墙和selinux   开始搭建Wiki前,需要下载一些软件包. wget https://www.atlassian.com/software/confluence/downloads/bi ...

  3. U盘安装Centos6.2

    原文地址:http://www.dedecms.com/knowledge/servers/linux-bsd/2012/0819/8452.html. 第一步:制作系统U盘(略). 第二步:设置BI ...

  4. Arduino SPI + SPI Flash芯片W25Q80BV

    W25Q80BV是台湾华邦电子(Winbond)生产的8M-bit串行flash芯片.主要特性有: 工作电压:2.5 ~ 3.6 V 功耗:读写(active)时4mA,低功耗(power-down) ...

  5. 【Newtonsoft.Json.dll】操作列表JSON数据

    JObject data = JObject.Parse(json); JArray array = JArray.Parse(data["list"] + "" ...

  6. c#用表达式树实现深拷贝功能

    因为对表达式树有点兴趣,出于练手的目的,试着写了一个深拷贝的工具库.支持.net standard2.0或.net framework4.5及以上. GitHub地址https://github.co ...

  7. jenkins+windows+springboot+.net项目自动化部署图文教程

    之前一直在linux中使用jenkins部署程序,正好现在的项目包括了winfrom程序,所以需要部署到windows系统中 jenkins官网:https://jenkins.io/ 下载之后运行j ...

  8. 清北学堂(2019 4 30 ) part 3

    今天总的讲些算法,会了的话...看上去好厉害的样子: 1.老朋友动态规划DP: DP重点: 1.边界条件,开头不需处理的数据,比如斐波那契数列中的第一二项 2.转移方程,后面的项需要根据前面几项求出自 ...

  9. [ActionScript 3.0] 翻牌效果,运用语法rotationY,PerspectiveProjection

    package { import com.tweener.transitions.Tweener; import flash.display.Bitmap; import flash.display. ...

  10. java 线程 获取当前线程

    java 线程 获取当前线程 Thread th=Thread.currentThread(); System.out.println("Tread name:"+th.getNa ...