Android 猴子跑步脚本
我试图使用 Monkey runner 运行一个示例 python 程序,但不幸的是抛出了这种类型的错误:
Can't open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE
-s MonkeyServer IP Address.
-p MonkeyServer TCP Port.
-v MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)
Exception in thread "main" java.lang.NullPointerException 所以任何人都可以指导我如何解决这个问题以及如何使用猴子跑步者来执行此类事情
I was trying to run a a sample python program using monkey runner but unfortunately throwing an error of this type :
Can't open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE
-s MonkeyServer IP Address.
-p MonkeyServer TCP Port.
-v MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)
Exception in thread "main" java.lang.NullPointerException
so any one can guide me how to resolve this and how to use monkey runner to execute this type of things
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现将脚本路径设置为绝对路径对monkeyrunner 很有帮助。
我正在从 Python 脚本调用运行器,其中帮助程序类具有 startMonkey 方法:
这似乎对我有用。
I've found that making the path to the script absolute helped monkeyrunner.
I am invoking the runner from a Python script where a helper class has a startMonkey method:
This seems to be working for me.
脚本文件应该是完整路径文件名尝试下面
monkeyrunner c:\test_script\first.py
所以转到文件夹 \sdk\tools
并按Shift 和右键单击 打开命令提示符并输入 monkeyrunner c:\test_script\python_file_name.py
Script file should be a full path file name try below
monkeyrunner c:\test_script\first.py
So go to the folder \ sdk \ tools
and press shift and right click to open command prompt and type monkeyrunner c:\test_script\python_file_name.py