В тесте пользовательского интерфейса я запускаю:
InstrumentationRegistry
.getInstrumentation()
.uiAutomation
.executeShellCommand("-e emu finger touch 45146572")//or"adb -e emu finger touch 45146572"
и тогда я получил исключение:
*** FATAL EXCEPTION IN SYSTEM PROCESS: Thread-10
java.lang.RuntimeException: Error running shell command
at android.app.UiAutomationConnection$1.run(UiAutomationConnection.java:295)
Caused by: java.io.IOException: Error running exec(). Command: [-e, emu, finger, touch, 45146572] Working Directory: null Environment: null
at java.lang.ProcessManager.exec(ProcessManager.java:211)
at java.lang.Runtime.exec(Runtime.java:174)
at java.lang.Runtime.exec(Runtime.java:247)
at java.lang.Runtime.exec(Runtime.java:190)
at android.app.UiAutomationConnection$1.run(UiAutomationConnection.java:281)
Caused by: java.io.IOException: No such file or directory
at java.lang.ProcessManager.exec(Native Method)
at java.lang.ProcessManager.exec(ProcessManager.java:209)
at java.lang.Runtime.exec(Runtime.java:174)
at java.lang.Runtime.exec(Runtime.java:247)
at java.lang.Runtime.exec(Runtime.java:190)
at android.app.UiAutomationConnection$1.run(UiAutomationConnection.java:281)
У вас есть идеи, как это исправить?