IDEA里运行代码时出现Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class错误的解决办法(图文详解)
不多说,直接上干货!
问题详情
当出现这类错误时是由于版本不匹配造成的
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错误的解决办法(图文详解)的更多相关文章
- 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 ...
- IDEA里运行代码时出现Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger的解决办法(图文详解)
不多说,直接上干货! 问题详情 运行出现log4j的问题 -classpath "C:\Program Files\Java\jdk1.8.0_66\jre\lib\charsets.jar ...
- PHP生成页面二维码解决办法?详解
随着科技的进步,二维码应用领域越来越广泛,今天我给大家分享下如何使用PHP生成二维码,以及如何生成中间带LOGO图像的二维码. 具体工具: phpqrcode.php内库:这个文件可以到网上下载,如果 ...
- Elasticsearch集群状态健康值处于red状态问题分析与解决(图文详解)
问题详情 我的es集群,开启后,都好久了,一直报red状态??? 问题分析 有两个分片数据好像丢了. 不知道你这数据怎么丢的. 确认下本地到底还有没有,本地要是确认没了,那数据就丢了,删除索引 ...
- 对于maven创建spark项目的pom.xml配置文件(图文详解)
不多说,直接上干货! http://mvnrepository.com/ 这里,怎么创建,见 Spark编程环境搭建(基于Intellij IDEA的Ultimate版本)(包含Java和Scala版 ...
- 如何用R来处理数据表的长宽转换(图文详解)
不多说,直接上干货! 很多地方都需用到这个知识点,比如Tableau里. 通常可以采取如python 和 r来作为数据处理的前期. Tableau学习系列之Tableau如何通过数据透视表方式读取 ...
- VMware下OSSIM 5.2.0的下载、安装和初步使用(图文详解)
不多说,直接上干货! 入门阶段不建议选用最新的版本. 采用OSSIM 4.11 到 OSSIM5.0.3 之间任何版本做实验,sensor的状态都会是“V”. 建议,入门,采用OSSIM5.0.0 ...
- 如何用Python来处理数据表的长宽转换(图文详解)
不多说,直接上干货! 很多地方都需用到这个知识点,比如Tableau里. 通常可以采取如python 和 r来作为数据处理的前期. Tableau学习系列之Tableau如何通过数据透视表方式读取 ...
- IDEA里运行程序时出现Error:scalac:error while loading JUnit4 , Scala signature JUnit4 has wrong version错误的解决办法(图文详解)
不多说,直接上干货! 问题详情 当我们在运行程序时,出现Error:scalac:error while loading JUnit4 , Scala signature JUnit4 has wro ...
随机推荐
- 团体程序设计天梯赛L2-003 月饼 2017-03-22 18:17 42人阅读 评论(0) 收藏
L2-003. 月饼 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不 ...
- IIC接口总线
转载:http://www.eefocus.com/article/08-07/48416s.html图11-1给出一个由MCU作为主机,通过IIC总线带3个从机的单主机IIC总线系统.这是最常用.最 ...
- 阿里云ECS云服务器编译安装PHP遇到virtual memory exhausted: Cannot allocate memory
阿里云编译安装php时遇到virtual memory exhausted: Cannot allocate memory 买了个服务器, 1G 的内存阿里云服务器,编译东西按说应该够了,安装相关的内 ...
- Arduino I2C + 气压传感器LPS25H
LPS25H是ST生产的MEMS数字气压传感器.主要特性有: 测量范围:260 ~ 1260 hPa绝对气压 分辨率:均方根1 Pa 工作电压:1.7 ~ 3.6 V 功耗:4μA(低分辨率模式)~2 ...
- 自己动手设计并实现一个linux嵌入式UI框架(设计)
看了"自己动手设计并实现一个linux嵌入式UI框架"显然没有尽兴,因为还没有看到庐山真面目,那我今天继续,先来说说,我用到了哪些知识背景.如:C语言基础知识,尤其是指针.函数指针 ...
- OCP 052题库全变,最新052考试题及答案整理-第11题
11.Which three are true about UNDO data? A) It is used to roll back failed transactions. B) It is us ...
- “全栈2019”Java第四十七章:继承与方法
难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...
- [Maven实战-许晓斌]-[第二章]-2.3安装目录分析
bin boot conf settings.xml非常重要 这个是maven安装包自带的settings.xml 通常我们会放在习惯路径,C:\Users\admin\.m2\下面 即 用户路径\ ...
- mysql扩展库应用---在线词典程序范例
1,在mysql中创建数据表words. create table words( id int primary key not null auto_increment, enword varchar( ...
- Linux多网口绑定配合华为5700 eth-trunk技术,提高网络性能
在实际的环境中,服务器通过网口绑定技术,可以很容易的实现网口冗余,负载均衡,从而达到高可用的目的,而且可以提升网络的性能,大幅的提升网络I/O. 一般情况下,Linux的多网口绑定使用的是内核中的“b ...