1

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

ありがとう。

4

3 に答える 3

1

これは、Android 開発ツールの最新バージョンである r12 の問題のようです。

このバグ レポートは、r11 からエミュレータ バイナリにダウングレードすると問題が解決することを示しています。Android SDK ダウンロード ページに移動し、OS の URL の「12」を「11」に変更します。その SDK を既存の SDK とは別のディレクトリにインストールし、Google が問題を修正するまでそのエミュレータ バージョンを使用します。

于 2011-08-22T20:17:54.620 に答える
0

VERSION 3.9で修正されたバグです。 http://www.charlesproxy.com/documentation/version-history/

于 2015-09-06T06:53:11.423 に答える
0

これを見ている他の人への更新として、この問題はr13で対処されています

于 2011-09-26T05:18:09.057 に答える