gpt4 book ai didi

android - UIAutomator 测试的安全异常

转载 作者:行者123 更新时间:2023-11-29 15:45:18 32 4
gpt4 key购买 nike

我的 UI automator 测试在 (Lollipop) 模拟器上运行绿色,但在 Sony Xperia Z1 (Lollipop 5.1.1) 上出现此错误。有任何想法吗 ?解决方法?

11-24 20:15:00.432 29892-29892/uk.co.xxx.tm D/LifecycleMonitor: Lifecycle status change: uk.co.xxx.tm.TmActivity@17d33faf in: STOPPED
11-24 20:15:00.433 29892-29892/uk.co.xxx.tm D/LifecycleMonitor: Lifecycle status change: uk.co.xxx.tm.TmActivity@17d33faf in: DESTROYED
11-24 20:15:00.460 29892-29932/uk.co.xxx.tm I/MonitoringInstrumentation: waitForActivitiesToComplete() took: 402ms
11-24 20:15:00.479 29892-29932/uk.co.xxx.tm E/AndroidRuntime: FATAL EXCEPTION: Instr: android.support.test.runner.AndroidJUnitRunner Process: uk.co.xxx.tm, PID: 29892 java.lang.SecurityException: Permission Denial: getIntentSender() from pid=29854, uid=2000, (need uid=1000) is not allowed to send as package android
at android.os.Parcel.readException(Parcel.java:1553)
at android.os.Parcel.readException(Parcel.java:1505)
at android.app.IUiAutomationConnection$Stub$Proxy.disconnect(IUiAutomationConnection.java:225)
at android.app.UiAutomation.disconnect(UiAutomation.java:241)
at android.app.Instrumentation.finish(Instrumentation.java:198)
at android.support.test.runner.MonitoringInstrumentation.finish(MonitoringInstrumentation.java:232)
at android.support.test.runner.AndroidJUnitRunner.finish(AndroidJUnitRunner.java:248)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:237)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)

最佳答案

根据 java.lang.SecurityException: Permission Denial: getIntentSender() when using UiAutomation in a test ,我检查了辅助功能设置,它现在以绿色运行,同时关闭了 TalkBack 和 Switch Access。

关于android - UIAutomator 测试的安全异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33903161/

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