错误:没有名为dtmilan的模块

2024-09-29 02:19:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我遵循了以下帖子中提到的步骤: Can't get AndroidViewClient example code to run

但我仍然收到错误“没有名为dtmilano的模块”

在我的测试.py文件我添加了以下行:

sys.path.append('C:\AndroidViewClient-master\AndroidViewClient-master\AndroidViewClient\src')
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from com.dtmilano.android.viewclient import ViewClient

同样的情况在转储.py文件

我还为AndroidViewClient设置了环境变量。 我错过了什么吗? 提前谢谢。在


Tags: 文件frompyimportmastercomgetexample
1条回答
网友
1楼 · 发布于 2024-09-29 02:19:12

我想这与“\”(反斜杠)的处理方式有关,它们可能是转义以下字符。在

按照说明使用AndroidViewClient插件here应该可以解决这个Windows问题。在

例如:

c:>\path\to\monkeyrunner -plugin \path\to\androidviewclient-<version>.jar myscript.py

相关问题 更多 >