gpt4 book ai didi

java - 预期错误 JUnit 版本 3.8 或更高版本 - Android Studio

转载 作者:太空宇宙 更新时间:2023-11-04 13:32:47 25 4
gpt4 key购买 nike

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

!!! 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)

Gradle :

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'

关于java - 预期错误 JUnit 版本 3.8 或更高版本 - Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32003899/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com