gdx-testing示例测试没有运行

时间:2018-06-17 13:03:03

标签: java junit libgdx junit4

使用libGDX和TomGrill的gdx-testing的测试子项目,并尝试使用gradle(gradlew tests:test)运行examples目录中的默认示例,我收到此错误。

Testing started at 14:47 ...
14:47:05: Executing task 'test'...

Executing tasks: [test]

Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
14:47:06: Task execution finished 'test'.

如果我尝试使用IntelliJ的运行测试按钮运行它 我收到了错误

Process finished with exit code 1
Class not found: "de.tomgrill.gdxtesting.examples.AssetExistsExampleTest"Empty test suite.

最后,如果我尝试只从该套件中运行一个测试,我会得到同样的错误。

我做错了什么?

1 个答案:

答案 0 :(得分:0)

原来错误是Gradle版本。我更新了谷歌提供的Android Gradle的最新版本,并使用了新的本地Gradle,因为某些原因,这不起作用。做了一个新的空项目并离开了原来的Gradle版本,测试运行了。可能有更好的方法可以解决这个问题,但是,我会继续解决这个问题。

相关问题