gpt4 book ai didi

java - 点击(160.0,120.0)无法完成! (java.lang.SecurityException : Injecting to another application requires INJECT_EVENTS permission)

转载 作者:行者123 更新时间:2023-12-01 11:07:32 29 4
gpt4 key购买 nike

当我尝试运行一些 Android 单元测试时,我不断遇到

junit.framework.AssertionFailedError: Click at (160.0, 120.0) can not be completed! (java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission) at com.robotium.solo.Clicker.clickOnScreen(Clicker.java:106) at com.robotium.solo.Clicker.clickOnScreen(Clicker.java:205) at com.robotium.solo.Clicker.clickOnScreen(Clicker.java:170) at com.robotium.solo.Solo.clickOnView(Solo.java:1096) at course.labs.notificationslab.tests.NewFeedTest.testRun(NewFeedTest.java:41) 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:555) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)

有人知道这个问题的原因以及如何解决吗?

谢谢。

最佳答案

如果软键盘打开并覆盖了您尝试单击的项目,通常会导致这种情况。我建议在继续之前确保它已关闭。

关于java - 点击(160.0,120.0)无法完成! (java.lang.SecurityException : Injecting to another application requires INJECT_EVENTS permission),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32789673/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com