我在运行 Robolectric示例应用程序 时遇到问题
当我开始“蚂蚁清洁测试”时,它给了我这样的错误。我该如何解决?谢谢。
-compile:
[javac] Compiling 37 source files to D:\Builds\RobolectricSample-master\bin\classes
[javac] Note: D:\Builds\RobolectricSample-master\src\main\java\com\pivotallabs\api\ApiGateway.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
compile.tests:
[mkdir] Created dir: D:\Builds\RobolectricSample-master\bin\testClasses
[javac] Compiling 70 source files to D:\Builds\RobolectricSample-master\bin\testClasses
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\injected\TestApplication.java:4: error: cannot find symbol
[javac] import org.robolectric.TestLifecycleApplication;
[javac] ^
[javac] symbol: class TestLifecycleApplication
[javac] location: package org.robolectric
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\injected\TestApplication.java:10: error: cannot find symbol
[javac] public class TestApplication extends com.pivotallabs.injected.Application implements TestLifecycleApplication {
[javac] ^
[javac] symbol: class TestLifecycleApplication
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\HomeActivityTest.java:33: error: cannot find symbol
[javac] activity = Robolectric.buildActivity(HomeActivity.class).create().get();
[javac] ^
[javac] symbol: method buildActivity(Class<HomeActivity>)
[javac] location: class Robolectric
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\NamesActivityTest.java:18: error: cannot find symbol
[javac] Activity activity = Robolectric.buildActivity(NamesActivity.class)
[javac] ^
[javac] symbol: method buildActivity(Class<NamesActivity>)
[javac] location: class Robolectric
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\injected\TestApplication.java:19: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\injected\TestApplication.java:23: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] D:\Builds\RobolectricSample-master\src\test\java\com\pivotallabs\injected\TestApplication.java:33: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 7 errors