为了账号安全,请及时绑定邮箱和手机立即绑定

运行monkey脚本出错

C:\Users\Administrator\android_SDK\sdk\tools>monkeyrunner demo.py

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]SyntaxError: Non-ASCII character in file 'C:\Users\Administrator\android_SDK\sdk\tools\demo.py', but no encoding declared; see http://www.python.org/peps/pep-0263.html for details


170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at org.python.core.Py.SyntaxError(Py.java:166)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at org.python.core.ParserFacade.fixParseError(ParserFacade.java:102)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at org.python.core.ParserFacade.parse(ParserFacade.java:184)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at org.python.core.Py.compile_flags(Py.java:1731)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at org.python.core.__builtin__.execfile_flags(__builtin__.java:514)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at com.android.monkeyrunner.ScriptRunner.run(ScriptRunner.java:116)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:77)

170315 16:05:46.884:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]     at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:189)


正在回答

2 回答

代码里是不是有中文?删除了试试

0 回复 有任何疑惑可以回复我~

adb kill-server

adb start-server

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

运行monkey脚本出错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信