android python errno 10053

时间:2013-04-30 18:59:29

标签: android python winsock

我正在尝试使用python学习创建android应用程序。我正在阅读教程。

当我运行命令时:

adb forward tcp:9999 tcp:4321
set AP_PORT=9999

然后运行代码,

import android
droid = android.Android()
droid.makeToast("Hello from my computer!")

它给了我错误:

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    droid.makeToast("Hello from my computer!")
  File "C:\Python27\lib\site-packages\android.py", line 58, in rpc_call
    return self._rpc(name, *args)
  File "C:\Python27\lib\site-packages\android.py", line 47, in _rpc
    response = self.client.readline()
  File "C:\Python27\lib\socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 10053] An established connection was aborted by the software in your host     machine

我该如何解决这个问题?

0 个答案:

没有答案