Android 2.1-update1 AVD 无法成功连接到 Charles Web Proxy 3.6
在 Windows 7 上的管理员命令提示符中,我输入:
C:\Program Files (x86)\Android\android-sdk\tools>emulator -avd Nexus -http-proxy localhost.:8888 -port 5554 -debug-proxy
我返回以下内容:
C:\Program Files (x86)\Android\android-sdk\tools>server name 'localhost.' resolved to 127.0.0.1:8888
proxy_http_setup: creating http proxy service connecting to: localhost.:8888
server name 'localhost.' resolved to 127.0.0.1:8888
proxy_http_setup: creating HTTP Proxy Service Footer is (len=2):
'
'
http_service_connect: trying to connect to (null)
http_service_connect: using HTTP rewriter
tcp:(null)(252): connecting
tcp:(null)(252): connected to http proxy, sending header
tcp:(null)(252): sending 27 bytes:
>> 43 4f 4e 4e 45 43 54 20 28 6e 75 6c 6c 29 20 48 CONNECT (null) H
>> 54 54 50 2f 31 2e 31 0d 0a 0d 0a TTP/1.1....
tcp:(null)(252): header sent, receiving first answer line
tcp:(null)(252): received 'HTTP/1.0 503'
tcp:(null)(252): connection refused, error=503
http_service_connect: trying to connect to (null)
http_service_connect: using HTTP rewriter
tcp:(null)(332): connecting
http_service_free
当我在模拟器中打开浏览器时,Charles 中有以下条目:
null:0
Failed
CONNECT request didn't include a port: (null)
HTTP/1.1
CONNECT
/127.0.0.1
如果我尝试使用我的 IP 地址,我会收到以下内容:
C:\Program Files (x86)\Android\android-sdk\tools>emulator -avd Nexus -http-proxy 192.234.2.90:8888 -debug-proxy
C:\Program Files (x86)\Android\android-sdk\tools>server name '192.xxx.2.xx' resolved to 192.xxx.2.xx:8888
emulator: Could not connect to proxy at 192.xxx.2.xx:8888: resource temporarily unavailable !
emulator: Proxy will be ignored !
如何我可以在 Android 模拟器上正确运行 Charles 吗?
我已经阅读了有关在模拟器运行时在“设置”中设置代理和端口的其他帖子,但在打开 -debug-proxy 时收到类似的错误。
谢谢。
From the Administrator Command Prompt on Windows 7, I type in:
C:\Program Files (x86)\Android\android-sdk\tools>emulator -avd Nexus -http-proxy localhost.:8888 -port 5554 -debug-proxy
I return the following:
C:\Program Files (x86)\Android\android-sdk\tools>server name 'localhost.' resolved to 127.0.0.1:8888
proxy_http_setup: creating http proxy service connecting to: localhost.:8888
server name 'localhost.' resolved to 127.0.0.1:8888
proxy_http_setup: creating HTTP Proxy Service Footer is (len=2):
'
'
http_service_connect: trying to connect to (null)
http_service_connect: using HTTP rewriter
tcp:(null)(252): connecting
tcp:(null)(252): connected to http proxy, sending header
tcp:(null)(252): sending 27 bytes:
>> 43 4f 4e 4e 45 43 54 20 28 6e 75 6c 6c 29 20 48 CONNECT (null) H
>> 54 54 50 2f 31 2e 31 0d 0a 0d 0a TTP/1.1....
tcp:(null)(252): header sent, receiving first answer line
tcp:(null)(252): received 'HTTP/1.0 503'
tcp:(null)(252): connection refused, error=503
http_service_connect: trying to connect to (null)
http_service_connect: using HTTP rewriter
tcp:(null)(332): connecting
http_service_free
When I open the browser in the emulator, I have the following entry in Charles:
null:0
Failed
CONNECT request didn't include a port: (null)
HTTP/1.1
CONNECT
/127.0.0.1
If I try to use my IP Address, I receive the following:
C:\Program Files (x86)\Android\android-sdk\tools>emulator -avd Nexus -http-proxy 192.234.2.90:8888 -debug-proxy
C:\Program Files (x86)\Android\android-sdk\tools>server name '192.xxx.2.xx' resolved to 192.xxx.2.xx:8888
emulator: Could not connect to proxy at 192.xxx.2.xx:8888: resource temporarily unavailable !
emulator: Proxy will be ignored !
How do I properly run Charles against the Android emulator?
I've read the other posts about setting the proxy and port in Settings while the emulator is running, but I receive the similar errors with -debug-proxy turned on.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这似乎是最新版本的Android开发工具r12的问题。
此错误报告表明从 r11 降级到模拟器二进制文件将解决该问题。转至 Android SDK 下载页面,然后根据您的操作系统更改 URL 中的“12”到“11”。将该 SDK 安装到与现有 SDK 不同的目录中,并使用该模拟器版本,直到 Google 修复问题。
This seems to be a problem with the latest version of the Android development tools, r12.
This bug report indicates that downgrading to the emulator binary from r11 will fix the problem. Go to the Android SDK download page and change the '12' in the URL for your OS to '11'. Install that SDK to a separate directory from your existing SDK, and use that emulator version until Google fixes the problem.
正如其他人看到的更新一样,这个问题已在 r13 中得到解决
Just as an update for anyone else looking at this, this problem has been addressed in r13
这是一个错误,已在 3.9 版本中修复。
http://www.charlesproxy.com/documentation/version-history/
It's a bug that had been fixed at VERSION 3.9.
http://www.charlesproxy.com/documentation/version-history/