Closed RyanJemy closed 1 year ago
报错日志:
调用代码: String packageName = AppBaseCase.targetPackageName; String continueTime = "5"; // unit: minute String throttle = "500"; String shell = "CLASSPATH=/sdcard/monkeyq.jar:/sdcard/framework.jar:/sdcard/fastbot-thirdpart.jar exec app_process /system/bin com.android.commands.monkey.Monkey -p " + packageName + " --agent reuseq --running-minutes " + continueTime + " --throttle " + throttle + " -v -v"; customLog.log("shell = " + shell); execCmd(new String[]{"bash", "-c", "adb -s " + sn + " shell " + shell});
String packageName = AppBaseCase.targetPackageName; String continueTime = "5"; // unit: minute String throttle = "500"; String shell = "CLASSPATH=/sdcard/monkeyq.jar:/sdcard/framework.jar:/sdcard/fastbot-thirdpart.jar exec app_process /system/bin com.android.commands.monkey.Monkey -p " + packageName + " --agent reuseq --running-minutes " + continueTime + " --throttle " + throttle + " -v -v"; customLog.log("shell = " + shell); execCmd(new String[]{"bash", "-c", "adb -s " + sn + " shell " + shell});
代码中调用的cmd命令在终端中直接执行是OK的,但是在代码中执行就会报上述的错误。帮忙看下具体的原因是什么呢?
报错日志:
调用代码:
String packageName = AppBaseCase.targetPackageName; String continueTime = "5"; // unit: minute String throttle = "500"; String shell = "CLASSPATH=/sdcard/monkeyq.jar:/sdcard/framework.jar:/sdcard/fastbot-thirdpart.jar exec app_process /system/bin com.android.commands.monkey.Monkey -p " + packageName + " --agent reuseq --running-minutes " + continueTime + " --throttle " + throttle + " -v -v"; customLog.log("shell = " + shell); execCmd(new String[]{"bash", "-c", "adb -s " + sn + " shell " + shell});
代码中调用的cmd命令在终端中直接执行是OK的,但是在代码中执行就会报上述的错误。帮忙看下具体的原因是什么呢?