开发者

Android emulator to communicate with pc emulator running on

开发者 https://www.devze.com 2023-01-10 05:19 出处:网络
I have an application that I will run on two separate emulators. This 开发者_如何学Capplication uses httpclient to communicate to the server application, that I will run on the same computer as the e

I have an application that I will run on two separate emulators.

This 开发者_如何学Capplication uses httpclient to communicate to the server application, that I will run on the same computer as the emulators are running.

"localhost" for the android emulator wont work as local would be the emulator itself. The computer will not be connected to a laptop.

Which address should I specify?


Use the IP 10.0.2.2 from within the Android emulator to connect to the local machine. See Emulator Networking on the Android developer site.

0

精彩评论

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