【发布时间】:2018-06-05 05:47:03
【问题描述】:
当我尝试运行以下内容时
process = Runtime.getRuntime().exec("input touchscreen swipe 100 1000 300 1000 1000"); //Normal swipe
有效。
但是,当我按以下方式使用它时,它不起作用。String[] inputs = {"adb", "shell", "input touchscreen swipe 500 1000 600 1000 1000"};
Process p = Runtime.getRuntime().exec(inputs);
p.waitFor();
我有另一个要运行的命令,要运行它,我必须使用第二种方法。谁能告诉我是什么原因或者我怎样才能让第二个运行?
【问题讨论】:
-
它抛出了什么错误?
-
@nakul 它不会抛出任何错误。它只是不起作用。