alibaba / web-editor

please use https://uiauto.dev instead
https://uiauto.dev
MIT License
1.24k stars 307 forks source link

关于连接安卓手机,报[ERROR] Local server not started, start with "$ python -m weditor"的一些解决方法 #114

Open watfe opened 2 years ago

watfe commented 2 years ago

image

逐项测试以下方法:

  1. 参照提示重新执行 python -m weditor

  2. adb devices 获取安卓设备id,填入,然后刷新页面 image

  3. http://localhost:17310/改成,你的本机ip,比如http://192.168.1.55:17310/

  4. 开发者工具中,禁用缓存参看 #76

  5. 打开安装手机上的ATX应用,点击启动UIAUTOMATOR一次(2022-07-11在安卓12MIUI13机器上碰到,具体日志为uiautomator2.exceptions.NullPointerExceptionError: -32001 Jsonrpc error: <java.lang.NullPointerException> data: java.lang.NullPointerException: Attempt to read from field 'int android.accessibilityservice.AccessibilityServiceInfo.flags' on a null object reference,通过本方法解决了)

chris2007 commented 1 year ago

更换你的python版本至3.6.5 瞬间就好了

Confusion-ymc commented 1 year ago

注释掉源文件\site-packages\colorama\ansitowin32.py 211行 试一下

def write_plain_text(self, text, start, end):
    if start < end:
        self.wrapped.write(text[start:end])
        # self.wrapped.flush()  # 这一行注释掉