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 をオンにすると同様のエラーが発生します。
ありがとう。