Android Studio - 使用 Junit 4.12 “!!!预计 JUnit 3.8 版或更高版本:" [英] Android Studio - with Junit 4.12 “!!! JUnit version 3.8 or later expected:”

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

问题描述

尝试了关于 this 帖子,但我仍然收到错误:

Tried out the suggestions on this post, but I still get the error:

!!! JUnit version 3.8 or later expected:

java.lang.RuntimeException: Stub!
    at junit.runner.BaseTestRunner.<init>(BaseTestRunner.java:5)
    at junit.textui.TestRunner.<init>(TestRunner.java:54)
    at junit.textui.TestRunner.<init>(TestRunner.java:48)
    at junit.textui.TestRunner.<init>(TestRunner.java:41)

Process finished with exit code -3

不知道从这里开始做什么.尝试重新组织 Junit 依赖项的顺序.不走运,还有其他人遇到这个问题吗?

Not sure what to do from here. Tried reorganizing the order of the Junit dependency. No luck, anyone else get this issue?

Android Studio V. 1.2.1.1

Android Studio V. 1.2.1.1

推荐答案

解决了问题.我在 Android Studio 中将 JUnit 测试作为标准的JUnit 测试"运行.我通过将配置重置为 Android 测试 解决了这个问题.

Solved the issue. I was running the JUnit tests as a standard "JUnit test" in Android Studio. I fixed the issue by resetting the configuration as a Android Test.

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

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