project was created by android studio 2026.1.2 p1 , i copy the starter code to my project, when learning Add automated test for adaptive apps, when i run android UI Test, Some Error emit in console like this:
07-25 23:20:09.472 16189 16202 I TestRunner: started: compactDevice_verifyUsingBottomNavigation(com.example.reply.ReplyAppTest)
07-25 23:20:09.516 16189 16202 W FileTestStorage: Output properties is not supported.
07-25 23:20:09.517 16189 16202 I Tracing : Tracer added: class androidx.test.platform.tracing.AndroidXTracer
07-25 23:20:09.521 16189 16189 D EventInjectionStrategy: Creating injection strategy with input manager.
07-25 23:20:09.524 16189 16202 E TestRunner: failed: compactDevice_verifyUsingBottomNavigation(com.example.reply.ReplyAppTest)
07-25 23:20:09.524 16189 16202 E TestRunner: ----- begin exception -----
07-25 23:20:09.526 16189 16202 E TestRunner: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.Espresso.onIdle(Espresso.java:18)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.Espresso.onIdle(Espresso.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.EspressoLink_androidKt.runEspressoOnIdle(EspressoLink.android.kt:88)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.EspressoLink.runUntilIdle(EspressoLink.android.kt:82)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invokeSuspend(ComposeUiTest.android.kt:682)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invoke(ComposeUiTest.android.kt:8)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invoke(ComposeUiTest.android.kt:4)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:318)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestDispatcher.processEvent$kotlinx_coroutines_test(TestDispatcher.kt:24)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestCoroutineScheduler.tryRunNextTaskUnless$kotlinx_coroutines_test(TestCoroutineScheduler.kt:99)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$workRunner$1.invokeSuspend(TestBuilders.kt:327)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.BuildersKt.runBlocking(dex-id-6409224b17ca93f38f37a10024b8e4578a51cfa3:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.BuildersKt.runBlocking$default(dex-id-6409224b17ca93f38f37a10024b8e4578a51cfa3:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:10)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:310)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(dex-id-f73f31edd90ab86b83a719043ec7ba1baebba9bc:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:168)
07-25 23:20:09.526 16189 16202 E TestRunner: at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(dex-id-f73f31edd90ab86b83a719043ec7ba1baebba9bc:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.runTest(ComposeUiTest.android.kt:665)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.compose.ui.test.junit4.AndroidComposeTestRule$apply$1.evaluate(AndroidComposeTestRule.android.kt:447)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.Suite.runChild(Suite.java:128)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.Suite.runChild(Suite.java:27)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
07-25 23:20:09.526 16189 16202 E TestRunner: at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:67)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:446)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2637)
07-25 23:20:09.526 16189 16202 E TestRunner: Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
07-25 23:20:09.526 16189 16202 E TestRunner: at java.util.concurrent.FutureTask.report(FutureTask.java:124)
07-25 23:20:09.526 16189 16202 E TestRunner: at java.util.concurrent.FutureTask.get(FutureTask.java:193)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.Espresso.onIdle(Espresso.java:12)
07-25 23:20:09.526 16189 16202 E TestRunner: ... 54 more
07-25 23:20:09.526 16189 16202 E TestRunner: Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.InputManagerEventInjectionStrategy.initialize(InputManagerEventInjectionStrategy.java:28)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.BaseLayerModule.provideEventInjector(BaseLayerModule.java:4)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.BaseLayerModule_ProvideEventInjectorFactory.provideEventInjector(BaseLayerModule_ProvideEventInjectorFactory.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.BaseLayerModule_ProvideEventInjectorFactory.get(BaseLayerModule_ProvideEventInjectorFactory.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.BaseLayerModule_ProvideEventInjectorFactory.get(BaseLayerModule_ProvideEventInjectorFactory.java:2)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.UiControllerImpl_Factory.get(UiControllerImpl_Factory.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.UiControllerImpl_Factory.get(UiControllerImpl_Factory.java:2)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.get(UiControllerModule_ProvideUiControllerFactory.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.get(UiControllerModule_ProvideUiControllerFactory.java:2)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.DaggerBaseLayerComponent$BaseLayerComponentImpl.uiController(DaggerBaseLayerComponent.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.Espresso$1.run(Espresso.java:1)
07-25 23:20:09.526 16189 16202 E TestRunner: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:520)
07-25 23:20:09.526 16189 16202 E TestRunner: at java.util.concurrent.FutureTask.run(FutureTask.java:328)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.os.Handler.handleCallback(Handler.java:1095)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.os.Handler.dispatchMessageImpl(Handler.java:135)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.os.Handler.dispatchMessage(Handler.java:125)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.os.Looper.loopOnce(Looper.java:296)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.os.Looper.loop(Looper.java:397)
07-25 23:20:09.526 16189 16202 E TestRunner: at android.app.ActivityThread.main(ActivityThread.java:9523)
07-25 23:20:09.526 16189 16202 E TestRunner: at java.lang.reflect.Method.invoke(Native Method)
07-25 23:20:09.526 16189 16202 E TestRunner: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575)
07-25 23:20:09.526 16189 16202 E TestRunner: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:939)
07-25 23:20:09.526 16189 16202 E TestRunner: Caused by: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
07-25 23:20:09.526 16189 16202 E TestRunner: at java.lang.Class.getMethod(Class.java:2942)
07-25 23:20:09.526 16189 16202 E TestRunner: at java.lang.Class.getDeclaredMethod(Class.java:2921)
07-25 23:20:09.526 16189 16202 E TestRunner: at androidx.test.espresso.base.InputManagerEventInjectionStrategy.initialize(InputManagerEventInjectionStrategy.java:5)
07-25 23:20:09.526 16189 16202 E TestRunner: ... 24 more
07-25 23:20:09.526 16189 16202 E TestRunner: ----- end exception -----
07-25 23:20:09.528 16189 16202 I TestRunner: finished: compactDevice_verifyUsingBottomNavigation(com.example.reply.ReplyAppTest)
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
at androidx.test.espresso.Espresso.onIdle(Espresso.java:18)
at androidx.test.espresso.Espresso.onIdle(Espresso.java:1)
at androidx.compose.ui.test.EspressoLink_androidKt.runEspressoOnIdle(EspressoLink.android.kt:88)
at androidx.compose.ui.test.EspressoLink.runUntilIdle(EspressoLink.android.kt:82)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invokeSuspend(ComposeUiTest.android.kt:682)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invoke(ComposeUiTest.android.kt:8)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$runTest$1$1.invoke(ComposeUiTest.android.kt:4)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:318)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
at kotlinx.coroutines.test.TestDispatcher.processEvent$kotlinx_coroutines_test(TestDispatcher.kt:24)
at kotlinx.coroutines.test.TestCoroutineScheduler.tryRunNextTaskUnless$kotlinx_coroutines_test(TestCoroutineScheduler.kt:99)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$workRunner$1.invokeSuspend(TestBuilders.kt:327)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt.runBlocking(dex-id-6409224b17ca93f38f37a10024b8e4578a51cfa3:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)
at kotlinx.coroutines.BuildersKt.runBlocking$default(dex-id-6409224b17ca93f38f37a10024b8e4578a51cfa3:1)
at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:10)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:310)
at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(dex-id-f73f31edd90ab86b83a719043ec7ba1baebba9bc:1)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:168)
at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(dex-id-f73f31edd90ab86b83a719043ec7ba1baebba9bc:1)
at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.runTest(ComposeUiTest.android.kt:665)
at androidx.compose.ui.test.junit4.AndroidComposeTestRule$apply$1.evaluate(AndroidComposeTestRule.android.kt:447)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:67)
at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:446)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2637)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
at java.util.concurrent.FutureTask.report(FutureTask.java:124)
at java.util.concurrent.FutureTask.get(FutureTask.java:193)
at androidx.test.espresso.Espresso.onIdle(Espresso.java:12)
... 54 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
at androidx.test.espresso.base.InputManagerEventInjectionStrategy.initialize(InputManagerEventInjectionStrategy.java:28)
at androidx.test.espresso.base.BaseLayerModule.provideEventInjector(BaseLayerModule.java:4)
at androidx.test.espresso.base.BaseLayerModule_ProvideEventInjectorFactory.provideEventInjector(BaseLayerModule_ProvideEventInjectorFactory.java:1)
at androidx.test.espresso.base.BaseLayerModule_ProvideEventInjectorFactory.get(BaseLayerModule_ProvideEventInjectorFactory.java:1)
at androidx.test.espresso.base.BaseLayerModule_ProvideEventInjectorFactory.get(BaseLayerModule_ProvideEventInjectorFactory.java:2)
at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
at androidx.test.espresso.base.UiControllerImpl_Factory.get(UiControllerImpl_Factory.java:1)
at androidx.test.espresso.base.UiControllerImpl_Factory.get(UiControllerImpl_Factory.java:2)
at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.get(UiControllerModule_ProvideUiControllerFactory.java:1)
at androidx.test.espresso.base.UiControllerModule_ProvideUiControllerFactory.get(UiControllerModule_ProvideUiControllerFactory.java:2)
at androidx.test.espresso.core.internal.deps.dagger.internal.DoubleCheck.get(DoubleCheck.java:6)
at androidx.test.espresso.DaggerBaseLayerComponent$BaseLayerComponentImpl.uiController(DaggerBaseLayerComponent.java:1)
at androidx.test.espresso.Espresso$1.run(Espresso.java:1)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:520)
at java.util.concurrent.FutureTask.run(FutureTask.java:328)
at android.os.Handler.handleCallback(Handler.java:1095)
at android.os.Handler.dispatchMessageImpl(Handler.java:135)
at android.os.Handler.dispatchMessage(Handler.java:125)
at android.os.Looper.loopOnce(Looper.java:296)
at android.os.Looper.loop(Looper.java:397)
at android.app.ActivityThread.main(ActivityThread.java:9523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:939)
Caused by: java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance []
at java.lang.Class.getMethod(Class.java:2942)
at java.lang.Class.getDeclaredMethod(Class.java:2921)
at androidx.test.espresso.base.InputManagerEventInjectionStrategy.initialize(InputManagerEventInjectionStrategy.java:5)
... 24 more
i do not know how solve this, Can anyone help ?
lib.version.toml
junitVersion = "1.1.5"
espressoCore = "3.5.1"
lifecycleRuntimeKtx = "2.6.1"
activityCompose = "1.8.0"
kotlin = "2.2.10"
composeBom = "2026.04.01"
lifecycleViewmodelCompose = "2.11.0"
materialIconsExtended = "1.7.8"
materialIconsCoreVersion = "1.7.8"
material3WindowSizeClass = "1.5.0-alpha24"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
androidx-compose-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "materialIconsExtended" }
androidx-compose-material-icons-core = { group = "androidx.compose.material", name = "material-icons-core", version.ref = "materialIconsCoreVersion" }
androidx-compose-material3-window-size-class1 = { group = "androidx.compose.material3", name = "material3-window-size-class", version.ref = "material3WindowSizeClass" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
app dependency
dependencies {
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.material.icons.core)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.window.size.class1)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.viewmodel.compose)
testImplementation(libs.junit)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.junit)
debugImplementation(libs.androidx.compose.ui.test.manifest)
debugImplementation(libs.androidx.compose.ui.tooling)
}
project was created by android studio 2026.1.2 p1 , i copy the starter code to my project, when learning Add automated test for adaptive apps, when i run android UI Test, Some Error emit in console like this:
i do not know how solve this, Can anyone help ?
lib.version.toml
app dependency