【发布时间】:2018-07-16 11:30:45
【问题描述】:
当我在 Android Studio 中运行 UIAutomator 时,有时会出现崩溃。
W/ActivityManager: Crash of app com.example.testsample running instrumentation ComponentInfo{com.example.testsample.test/android.support.test.runner.AndroidJUnitRunner}
07-16 19:19:34.191 7834-7850/? W/Binder: Binder call failed.
java.lang.SecurityException: Calling from not trusted UID!
at android.app.UiAutomationConnection.throwIfCalledByNotTrustedUidLocked(UiAutomationConnection.java:427)
at android.app.UiAutomationConnection.shutdown(UiAutomationConnection.java:324)
at android.app.IUiAutomationConnection$Stub.onTransact(IUiAutomationConnection.java:209)
at android.os.Binder.execTransact(Binder.java:570)
但它并不是每次都显示。当这没有显示时,我可以成功运行。 谁能帮我? 谢谢。
【问题讨论】:
-
我在另一台设备(HUAWEI Mate9)上试过同样的代码,效果很好。从不显示此错误。所以它可能只在特定设备中引起(对我来说是美图 T8)。
-
运行时显示此错误。测试未能完成。原因:“由于“进程崩溃”,仪器运行失败。”。检查设备 logcat 了解详细信息测试运行失败:由于“进程崩溃”,检测运行失败。
标签: java android testing android-uiautomator