Android uiAutomator で遊んでいるときに、4.1.2 デバイスでテストを実行しようとすると問題が発生しました。ここでリンクの説明を入力してからコードを使用すると、アプリ トレイをスクロールしようとすると例外がスローされます。
私は当初、API 16 ではなく API 17 に対してコンパイルしたことが原因だと考えていましたが、そうではないようです。他の誰かがこれに遭遇しましたか?
発生した例外:
[exec] java.lang.reflect.InvocationTargetException [exec] at java.lang.reflect.Method.invokeNative(Native Method) [exec] at java.lang.reflect.Method.invoke(Method.java:511) [exec] com.example.runTests(Runner.java:124) [exec] com.example.testExecutor(Runner.java:60) [exec] java.lang.reflect.Method.invokeNative(Native Method) [exec] でjava.lang.reflect.Method.invoke(Method.java:511) [exec] at junit.framework.TestCase.runTest(TestCase.java:168) [exec] at junit.framework.TestCase.runBare(TestCase.java: 134) [exec] at junit.framework.TestResult$1.protect(TestResult.java:115) [exec] at junit.framework.TestResult.runProtected(TestResult.java:133) [exec] at junit.framework.TestResult.run (TestResult.java:118) [exec] at junit.framework.TestCase.run(TestCase.java:124) [実行] com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:124) で [実行] com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85) で [実行] com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76) [exec] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) [exec] com.android.internal で。 os.RuntimeInit.nativeFinishInit(Native Method) [exec] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因by: java.lang.NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見るtestrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:124) [実行] com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85) で [実行] com.android.commands.uiautomator.RunTestCommand.run( RunTestCommand.java:76) [実行] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) で [実行] com.android.internal.os.RuntimeInit.nativeFinishInit(ネイティブ メソッド) で [実行] com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang.NoSuchMethodError: com.android. uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見るtestrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:124) [実行] com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85) で [実行] com.android.commands.uiautomator.RunTestCommand.run( RunTestCommand.java:76) [実行] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) で [実行] com.android.internal.os.RuntimeInit.nativeFinishInit(ネイティブ メソッド) で [実行] com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang.NoSuchMethodError: com.android. uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見る124) [実行] com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85) で [実行] com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76) で [実行] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) [実行] com.android.internal.os.RuntimeInit.nativeFinishInit(ネイティブ メソッド) [実行] com.android.internal.os.RuntimeInit で.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang.NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 詳細124) [実行] com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85) で [実行] com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76) で [実行] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) [実行] com.android.internal.os.RuntimeInit.nativeFinishInit(ネイティブ メソッド) [実行] com.android.internal.os.RuntimeInit で.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang.NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 詳細uiautomator.RunTestCommand.run(RunTestCommand.java:76) [実行] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) で [実行] com.android.internal.os.RuntimeInit.nativeFinishInit( Native Method) [exec] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang. NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見るuiautomator.RunTestCommand.run(RunTestCommand.java:76) [実行] com.android.commands.uiautomator.Launcher.main(Launcher.java:83) で [実行] com.android.internal.os.RuntimeInit.nativeFinishInit( Native Method) [exec] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang. NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example.Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見るjava:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang.NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example. Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見るjava:235) [exec] at dalvik.system.NativeStart.main(Native Method) [exec] 原因: java.lang.NoSuchMethodError: com.android.uiautomator.core.UiScrollable.setAsHorizontalList [exec] at com.example. Runner.launchAppFromHomeScreen(Test.java:45) [exec] ... 19 もっと見る