使用Android KitKat的JUnit测试中的ClassCastException
我发现Android KitKat上出现了一个以前从未出现过的问题 我在Robotium上使用JUnit测试,测试中的一切都很好,除了Android KitKat(在Nexus 4更新版和Nexus 5上进行了尝试) 当我想单独表演时,我总是有同样的例外:使用Android KitKat的JUnit测试中的ClassCastException,android,junit,Android,Junit,我发现Android KitKat上出现了一个以前从未出现过的问题 我在Robotium上使用JUnit测试,测试中的一切都很好,除了Android KitKat(在Nexus 4更新版和Nexus 5上进行了尝试) 当我想单独表演时,我总是有同样的例外: java.lang.ClassCastException: java.util.ArrayList cannot be cast to android.view.View[] at com.jayway.android.robotium.so
java.lang.ClassCastException: java.util.ArrayList cannot be cast to android.view.View[]
at com.jayway.android.robotium.solo.ViewFetcher.getWindowDecorViews(ViewFetcher.java:399)
at com.jayway.android.robotium.solo.ViewFetcher.getAllViews(ViewFetcher.java:81)
at com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:165)
at com.jayway.android.robotium.solo.Waiter.waitForView(Waiter.java:254)
at com.jayway.android.robotium.solo.Waiter.waitForView(Waiter.java:233)
at com.jayway.android.robotium.solo.Solo.clickOnView(Solo.java:967)
at com.example.TestClass.testMethod(TestClass.java:61)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
你知道这有什么原因吗?我是robotium 4.3的 将其更新到刚刚更新的版本4.3.1解决了此问题