yyogenMod 上的 Monkeyrunner 的 Python 脚本
我有一些脚本可以在 htcdesire 上完美运行,并且有意义。但是,当我使用cyanogenMod 在 htcdesire 上启动脚本时,它会抛出很多奇怪的异常。有人熟悉这类话题吗?
例如,我有一个脚本,在感觉上运行完全良好,但在氰基上它会抛出 time.sleep(10) 的异常,如果我注释掉这个(在氰基上),我运行时不会有异常,但如果我给一些时间睡觉它会抛出异常
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] Error sending touch event: 150 700 DOWN_AND_UP
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice]java.net.SocketException: Broken pipe
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.net.SocketOutputStream.socketWrite0(Native Method)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
我不明白为什么 time.sleep 对氰基抛出异常:S。 。 。
笔记: 我在sense和cyanogenMod上运行相同的脚本,在sense上工作没有问题cyanogen它在time.sleep上抛出破损的管道。 。 。
谢谢
I have some scripts that run perfectly on htc desire with sense on it. But when I start my scripts on htc desire with cyanogenMod it throws a lot of weird exception. Is anybody familiar with this kind of topic ?
for example I have script that runs entirely good on sense, but on cyanogen it throws exception for time.sleep(10), if I comment this out (on cyanogen) I runs with no exception but if I give some time to sleep it throws
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] Error sending touch event: 150 700 DOWN_AND_UP
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice]java.net.SocketException: Broken pipe
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.net.SocketOutputStream.socketWrite0(Native Method)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
120119 14:06:18.555:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
I do not understand why time.sleep throws exception on cyanogen :S . . .
NOTE:
I run the same script on sense and cyanogenMod, in sense work with no problems on cyanogen it trows broken pipe on time.sleep . . .
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这只是一个建议。您是否尝试过更改睡眠方法的时间。有时可能会出现一些线程超时问题。只需尝试 2 或 3 秒的睡眠方法即可。
This is only a suggestion. Have you tried with changing the time on your sleep method. sometimes there may be some thread timeout issues. Just try out with 2 or 3 seconds to your sleep method.