Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java gdx测试示例测试未运行_Java_Junit_Libgdx_Junit4 - Fatal编程技术网

Java gdx测试示例测试未运行

Java gdx测试示例测试未运行,java,junit,libgdx,junit4,Java,Junit,Libgdx,Junit4,使用libGDX和TomGrill的gdx testing的tests子项目,并尝试从examples目录运行gradle(gradlew tests:test)默认示例,我得到了这个错误 Testing started at 14:47 ... 14:47:05: Executing task 'test'... Executing tasks: [test] Configuration on demand is an incubating feature. FAILURE: Build

使用libGDX和TomGrill的gdx testing的tests子项目,并尝试从examples目录运行gradle(
gradlew tests:test
)默认示例,我得到了这个错误

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.
最后,如果我试图从上述套件中只运行一个测试,我会得到相同的错误


我做错了什么?

原来是Gradle版本的错误。我更新了谷歌提供的最新版本的Android Gradle,并根据需要使用了更新的本地Gradle,但由于某些原因,这不起作用。创建一个新的空项目,保留原始的Gradle版本,然后运行测试。也许有更好的方法来解决这个问题,不过,我还是要用这个