Address unreachable in Android Emulator also when runned with google DNS - android

I have been trying to run correctly the default Android emulator for many hours. Each time, despite setting the DNS address 8.8.8.8, I get the error -2 -> ERR_ADDRESS_UNREACHABLE. When I runned the GenyMotion emulator, then the internet works, but on the default emulator I can not get the connection. What can I do more? Thanks!

Solution: I downloaded different AVD Device with lower API. In Android P in my case internet doesn't works.

Related

Android TV Emulator No Internet

No matter the configuration, if I create a TV emulator using the AVD, it has no internet access. There is no such issue if I create a common phone/tablet emulator. Any ideas why this is happening? I've checked some answers suggesting to run the cmd and enter 8.8.8.8 as dns there, but it wont help...
To get internet access please update to new emulator image.
Ex. from lollipop image to marshmallow image

Genymotion didn't get an ip address from virtual box

I've installed genymotion about 2 days ago and I've been facing the same problem every time I tried to start a device.
After I downloaded a device in genymotion (Nexus S - 4.2.2 - API 17 - 480*800) I launched it.
Then after a box poped up telling me I have to wait, I got this error:
The virtual terminal genymotion didn't get an ip address. For an
unknown reason the virtualbox's dhcp servor didn't assign an ip adress
to the virtual terminal. Please launch virtualbox to find a solution
to this problem
I can't figure out how to solve this problem.
I looked up on many websites but it seems as if I'm the only one to get this error.
I'm on Windows XP-SP3.
My graphic card is a radeon HD 3600 driver up to date.
Does anyone have any idea?
Thank you.
Try downgrading to Virtual Box 4.2.18, if you are using 4.3.X.
I had a similar situation to yours.
I was using Genymotion 1.3.0 on Win7, with latest Virtual Box 4.3.2. Genymotion broke down after a computer shutdown, and never worked again.
I kinda stumbled onto this solution. After downgrading, Genymotion survived one shutdown now.
All Android VMs used to work for me under Genymotion 2.0.0. with default RAM and CPU settings and VirtualBox 4.3.2 (on ubuntu 13.10). Upgrading to 2.0.1 made them stop working and give the error you mentioned.
I tried various fixes as I described here: https://stackoverflow.com/a/20018833/2527118, but in summary what fixed my problem was to delete VM and recreate it (same source and settings) in GenyMotion. You might want to try the other fixes (less destructive) before doing that.
Andrei
I try to solve this for 6 days and in the end, I realized I needed to uninstall then re install virtual box so I can get their default settings then change my network settings as explained better in this link. It explains in depth how the ip address works with the virtual machine, and how the chances of it trying to use a static ip address are very likely.
https://askubuntu.com/questions/232876/how-to-let-a-virtualbox-guest-running-windows-access-the-internet
let your network settings be handled by themselves if you've tried everything, maybe this will allow your VM to use its own IP address and stop trying to use your Physical devices IP address.
Hope this helps.
I had the problem with the IP error, too. As I have a real Samsung Galaxy S2, I downloaded the vitual version 2.3.7 Api 10 in Genimotion. All IP settings were correct, the sequence of starting the programms didn`t matter. The IP error reoccured :( .
Finaly, I tried to use another virtual device: Custom Tablet 5.1.0 API 22. It loaded and worked, but very slow. WhatsApp got stuck on the installation process :( . As this article on Heisse.de recomended to use the Nexus S 4.1.1 for WhatsApp, I tried this third vitual device and everything worked fine :) !
http://www.heise.de/download/special-whatsapp-auf-pc-mac-und-linux-nutzen-152241.html?hg=1&hgi=3&hgf=false
I know this post is old. But my answer is just for someone who google this issue and hopefully it may help them since I also stuck on it for a long time and fix it fortunately.
This is my way to fix the problem:
First of all, I had configured all the settings what the people said on the internet like the following link: Not able to start Genymotion device
I found that it's still failed to run the VM on GenyMotion.
So I tried to remove all the existing Host-only Network like vboxnet0 or vboxnet1(According to the official website of GenyMotion, it said that it will regenerate a new one when there is no any vboxnet)
Finally, I tried to restart the VM on GenyMotion, suddenly I run it successfully without any errors message
Notes: I disabled the adaptor 2, 3 and 4 before I was gonna tried the above actions.
As other have said, you have to install Virtual Box. In my case (using Ubuntu 16.04), I had to enable the 'virtualization' in Bios. Once that was setup, I was able to set the 'OS' to use 'Ubuntu 64bit' in 'settings/general' tab.
Other possible solutions include, configuring Virtual Box further, including reducing the RAM usage (in settings), in 'Network' tab in settings, under 'advanced' options, disabling the 'cable connected' option & setting 'Promiscuous mode' to 'allow all'.
IN case a Genymotion device cannot obtain an IP address any more, you might want to check the configuration in the VM-Ware settings: I got this fixed by removing the "promiscous mode" from the network adapter 1 settings - see screenshot.
The promiscous setting may lead to difficulties in obtaining an IP address in the genymotion simulator

Internet access from android emulator slow or unstable

I have enabled permissions for internet access, there are no proxies to deal with. I find that though most of the time i can access the net from the browser in the emulator or from my application the access is very slow though I have high speed broadband connection.
My question is this - is there a setting in the emulator that is meant to simulate the speed of the internet connection and by default set to a lower value? if yes how do i change it. if not why is the connection slow in the emulator.
Another problem is that this connection breaks often and I get page not found exception from both my application and the browser in the emulator. this becomes ok once I restart he emulator.
Thanks for any help.
There is a setting to delay & throttle network I/O on the emulator but it defaults to full speed.
The problem is probably somewhere else since there is AFAIK no GUI / keyboard shortcut to trigger that delay and you would need to start the emulator from command line & specify these options.
I ended up trying this and seems to make a difference or maybe it is my imagination because the documentation says that the default is full speed and no latency. But this does allow one to change the speed and also various other settings without having to restart the emulator.
Launch emulator and wait for it to load completely
From command line telnet to the emulator at the appropriate port for the AVD ex. telnet localhost 5554
This will bring you to the AVD console. here use the command network speed full.
More info - http://developer.android.com/guide/developing/devices/emulator.html
This can be done from commandline launch of emulator, but If you launch the emulator from avd manager and wish to change some settings while the emulator is running this may be useful

Android 2.1 Emulator Without Internet Connection

I have no Internet access in my Android Emulator.
The app I am developing needs Internet connection, but the Android Emulator have no internet connection. I also tried to use the native browser of the emulator, but it also does not work.
When I export my app to a real android, it works just fine.
I already tried to press F8 to turn on and off the "3G connection" in the 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
Try recreating the emulator instance. Sometimes the instances get corrupted and you get weird behavior like the one described by you above. The internet connection should work without any interaction in a fresh emulator instance.
If you are behind a firewall or you are using a proxy then things can get a bit more complicated but there are workarounds for those situations also.
Don't keep re-creating new instances of the same emulator. I had this problem before and created a brand new emulator (same settings as the other one), and it worked fine for some reason.
I had to set manually the DNS Server of my emulator.
To do that:
Within Eclipse I went to Run Configurations -> Target and added "-dns-server X.X.X.X" and everything worked fine afterwards. (obviously X.X.X.X was the IP address for my DNS server).
so i put this line: -debug-slirp -dns-server 192.168.178.1

emulator throwing hostunresolved exception in android?

i have as my first activity in my application a request to a certain address, from where i get XML and then i parse it...
I have added the permission on for internet access in my android.manifest file.
my problem
whenever i run my application on my emulator the following exception is thrown:
05-19 18:25:05.099: WARN/System.err(473): java.net.UnknownHostException: Host is unresolved: www.svgverlag.de:80
i don't understand what is going wrong.
when i open the same address in my browser it opens up fine
i have tried restarting the emulator several times.
i am using a mac.
thank you in advance.
EDIT:
i have tried creating several emulators and in all of them this is happening.Also i tried on my friends macbook pro, and the same thing is happening.
Also in the emulator's browser no webpage is opening.For some reason the emulator is not able to access the internet.
UPDATE
I believe that there is a problem with the emulator on mac per se. No matter what i try:
set the dns in Eclipse Preferences using dns-server- 8.8.8.8
turn of my firewall
nothing seems to make a difference and my emulator is not able to access the internet.
Also there is a 3G symbol at the top of my emulator but with no help regarding internet access.
While on a my windows machine, things seem to work fine without any settings from my side.
what do i do?
Can you try using the IP address of this website instead of using its host name?

Categories

Resources