错误JUnit版本3.8或更高版本-Android Studio [英] Error JUnit version 3.8 or later expected - Android Studio

查看:123
本文介绍了错误JUnit版本3.8或更高版本-Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

连接库JUnit,运行测试时出现错误:

Connecting library JUnit, when I runing the test, I have a error:

!!! JUnit version 3.8 or later expected:

java.lang.RuntimeException: Stub! at
    junit.runner.BaseTestRunner.(BaseTestRunner.java:5) at
    junit.textui.TestRunner.(TestRunner.java:54) at
    junit.textui.TestRunner.(TestRunner.java:48) at
    junit.textui.TestRunner.(TestRunner.java:41) at
    com.intellij.rt.execution.junit.JUnitStarter.junitVersionChecks(JUnitStarter.java:191)
    at
    com.intellij.rt.execution.junit.JUnitStarter.canWorkWithJUnitVersion(JUnitStarter.java:174)
    at
    com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497) at
    com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

等级:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
testCompile 'junit:junit:4.11'}

推荐答案

嗯,为什么不尝试

testCompile 'junit:junit:3.8'}

?

这篇关于错误JUnit版本3.8或更高版本-Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆