Premise: Android via wifi connection Network A, the real machine is in Network B, network A and network B are in different network segments, you can increase the route, ping each other, if network A and network B is in the public network, there is no need to
Do the following.
When debugging using Android Real machine, if you want to access resources under the Local service, configure the IP to configure the following
1.android mobile phone through WiFi connection network, the network and the local network in different network segments, but by increasing the route can be ping through, you can use this method to continue the configuration, if you can not ping, then the method is not valid, no need to go down
Perform the following actions on this machine, increase the route, start the command line, and do the following.
Route Delete 0.0.0.0
Route add 192.1.1.0 Mask 255.255.255.0 192.1.1.2-p
Route add 0.0.0.0 Mask 0.0.0.0 192.168.0.1-p
Route print
Specific values are configured according to network conditions
2. Turn on native services, such as Hfs,wampserver, at the same time, you need to add inbound rules in Windows Firewall and add 80 ports to inbound.
3. In the Android program, configure the IP of the native service, which is the native LAN real IP
Access Local Service IP settings when Android real-Time debugging