I cannot use the browser and internet connection in my android app with android simulator.
When I try to open a homepage using the native webbrowser in the emulator, but when I use the ip address, it opens just fine.
How can I fix DNS problems in the android Emulator.
I already turned off the Windows Firewall, but it didn't work.
Data: Windows 7 x64 / Eclipse Plugin for Android / Android version 2.1
Do you have multiple NICs on your machine? The emulator might be trying to use a DNS that it cannot access (i.e. going through the wired DNS server if wired is disconnected). You can check which DNS server is being used by starting the emulator with the -debug-slirp flag.
See here for more info.
Related
I am developing a React Native mobile app in a Mac environment for both iOS and Android devices (iOS is running perfect as usual). I have Android Studio installed with all the necessary dependencies from the SDK Manager, and the project builds and starts up successfully on both Android emulator and iOS simulator.
Here's where the problem kind of starts. I also have Parallels installed running Windows 10 with Visual Studio 2015 (Shared Network setting in Parallels), which runs my Web API project on Local IIS. The goal is to have these devices make requests to the Web API project in the Parallels environment (Again, iOS is good, Android is the problem).
On the Windows machine, I have modified the hosts file to include
127.0.0.1 <IISHostName>
On Mac, I have modified the hosts file to include
<MyWindowsIPAddress> <IISHostName>
On Mac, I am able to hit the Windows dev environment using a REST client and from the iOS simulator. However, the Android emulator (Genymotion) does not. It comes back with an error "Network Request Failed".
I am guessing that in the "Dev Settings"->"Debug server host & port for device", there is an address that needs to be set in order for the emulator to communicate locally with the Mac, which will then communicate with Parallels, but I'm not sure. Any suggestions?
*Note: Most articles I've read give instructions for the Windows environment to be able to see an emulator on Mac, I would like it the other way around (Emulator on Mac -> Windows).
This can be done as follows:
From a windows command prompt, run ipconfig and snag your IP:
IPv4 Address. . . . . . . . . . . : 10.211.55.4
Next, modify your .vs\config\applicationHost.config to bind to all interfaces:
binding protocol="http" bindingInformation=":8080:" />
Restart your web api project
Navigate to http://10.211.55.4:8080/... from your android emulator's browser to confirm.
I am attempting to connect to the localhost of the machine from which I am booting a VS Android Emulator. I am able to successfully connect to the IIS Server when the Android version is Kitkat. However, I fail to connect when the VS Android Version is Lollipop or Marshmallow. The way I am connecting to the localhost is typing http://169.254.80.80 in the browser of the Emulator. As per http://developer.android.com/tools/devices/emulator.html#networkaddresses I should be able to connect to localhost using the IP address 10.0.2.2. However, this IP address doesn't seem to work for me.
VS studio Emulator work very fine and fast
see the screen shot that how you can connect VS Emulator to localhoat
The network addresses specified on http://developer.android.com/tools/devices/emulator.html#networkaddresses will not work for the Visual Studio Emulator for Android (well, except the very last one, which is the standard localhost IP address).
The address 169.254.80.80 is expected to work as a loopback to the host. There seems to be a bug regarding connectivity back to the host using that address on images running Lollipop (21) and above. I have logged a bug internally for this.
The previous answer is perfect but Android studio 3+ emulator need to add IP and port on proxy under setting.
I'm attempting to connect the Visual Studio Android Emulator v. 1.0.50813.2 through Fiddler as a proxy so I can monitor some network traffic for an application I'm writing.
I've followed the MS provided instructions to a T. (http://blogs.msdn.com/b/visualstudioalm/archive/2015/05/06/using-fiddler-to-monitor-network-traffic-from-the-vs-emulator-for-android.aspx) still I get a "net:ERR_TIMED_OUT" message when attempting to hit the Fiddler echo endpoint.
I've also tried following the instructions in How to connect Visual Studio 2015 Android Emulator to network? as I had the Xamarin Android Player installed at one point.
I'm trying to use the current VS Emulator 5.1-inch Lollipop (5.1.1) XXHDPI phone emulator environment, but I've also tried the VS Emulator 5-inch KitKat (4.4) XXHDPI phone environment as well. Both produce the same results.
The emulator will connect to the network just fine without the proxy being set up. I've completely disabled the Windows firewall so that shouldn't be an issue.
The Fiddler proxy echo service works just fine on the host operating system (Windows 8.1) and the Loopback extensions have been added to ensure that it isn't a problem with app container isolation.
Does anyone know how I can correct this and get the VS emulator to correctly interface with Fiddler? I'm OK switching to anything more recent than Android API Level 15.
I had the same error with Fiddler
its odd but I read some where to uninstall Fiddler and then reinstall it worked for me
give it a go and let me see how you go
just got mine working now
I have installed Genymotion 2.2 with Android 4.1 guest OS. Also, I have Apache running on host OS with several local sites.
Is it possible to get each local site from the guest's Android browser?
I tried to do this with ProxyDroid app, but it didn't work for me.
Yes, you can. As you can see in the image below, I am connecting to my Tomcat server running on my laptop via the browser in Genymotion machine. Notice that I have used my IP address to connect to Tomcat:
I made a web service in .Net Framework 3.5 in Microsoft Visual Studio 2008 and called it from android. I used Sql Server as a database.
When I am running my application in the android emulator, it will run fine but if I install it onto my android device, then it will throw a java.socket.SocketTimeOutException.
Is your server running on your desktop from Visual Studio? If so, you cant connect to it from any machine but that particular desktop unless you forward ports or use a proxy server (also on the same machine).
I got the solution. Please take care that your computer Firewall is off when you use IIS as virtual server on your local pc. If you turn off your firewall protection then it will be allowed you to access the web methods but if firewall is on then you get java.net.SocketTimeOutException