开发者

Request Error (invalid_request) - Android Browser

I have a basic开发者_JS百科 Jetty server running locally. If I pull up http://localhost/servlet1 in a web browser on my desktop, I am able to see proper content (basic html page). However, when I navigate to this site in the Android Emulator (2.2), I get the following error:

Request Error (invalid_request) Your request could not be processed.

Request could not be handled This could be caused by a misconfiguration, or possibly a malformed request.

For assistance, contact your network support team.

Any idea what the issue might be? I'm afraid to move on if this basic task doesn't work.


Due to the nature of the network stack in the emulator, you can't use "localhost" or 127.0.0.1 to connect to the host computer. Try using 10.0.2.2 instead, so: http://10.0.2.2/servlet1

From http://code.google.com/p/android/issues/detail?id=133:

127.0.0.1 is the emulated system's own loopback interface, not the one running on your host development machine.

within the Android system, one should use 10.0.2.2 which is an alias specifically setup to contact your host 127.0.0.1

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜