No internet connection for Visual Studio Android Emulator - android

I'm using Android Emulator that comes with Visual Studio 2015. When I run it, in Wi-Fi settings of Android this status appears Obtaining IP Address.. for Wired eth1 network. But it fails after a long time.
What I've tried:
Removed all the virtual switches in Virtual Switch Manager of Hyper-V before running the emulator.
Unchecked automatic detect settings in proxy settings
Tried different API levels (19,22,..)
Windows Phone Emulator doesn't have this problem and has internet connection.
Restarted my PC!
What I guess:
When I diagnose vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) it says it has an invalid IP address. Also inside android emulator it tries to obtain an IP. Obviously I need to give the emulator a valid IP, but I don't know how or where or what value.
How to give the Android emulator internet access?
Thanks in advance.

It looks like Android is unable to acquire an IP address from DHCP.
In Hyper-V Manager (virtmgmt.msc), select the VM for the emulator profile you are trying to start and go to its Settings... (right click for context menu or see action pane on right side).
Under Hardware, make sure there are two virtual switches:
Emulator Internal Network Adapter
Emulator External Network Adapter
Emulator External Network Adapter must be listed as the second adapter -- the order matters. If they are ordered incorrectly, delete the External adapter and recreate it, giving it the same settings it had before. You can create it by clicking Add Hardware in the VM's hardware list.

I fixed it by setting the second network adapter to Default switch and not the physical network adapterScreen Grab.

Thought this might help someone out there. Mine had an internet connection, but suddenly it stopped connecting. I resolved it by restarting my emulator with factory settings.

For me adding an external adapter for each physical one (lan/wifi) worked but only when the virtual LAN identification was unchecked on each of them.

For unknown reasons by default my second adapter was set to VirtualBox Host Ethernet
I've changed it to Intel Dual Band and now all works even without emulator restart!

Related

VS Emulator for Android has no internet connection

As the title says, my VS Android Emulator has no connection to the internet. In the Android screen, it says it's connected to WiFi, but browsing doesn't work.
Expect the problem is I am running Windows 10 in Parallels on my MacBook, but I don't know how to fix it. Windows "thinks" it's connected to ethernet.
My adapter settings in Windows look like this:
Hyper-V network settings for my emulator:
Network settings in Parallels is set to Bridged Network WIFI
Try enabling Enable Virtual LAN Identification from your Hyper-V Network settings screen. If that doesn't work, you may try changing the switch and VLAN IDs until it works.
Microsoft recently announced a release of VS for Mac. That will be a far more user friendly option or even better go straight for the gold and use Android studio 2. You really shouldn't have to run Parallels at all for what you are trying to do, and this is what is ultimately giving you problems in the first place. Even if you do solve this internet issue there will most likely be another issue that crops up and there are enough problems to deal with devving as it is.

Visual studio android emulator will not start fully

I create a blank cordova application in visual studio 2015 and start debugging with the visual studio android emulators (first with the lollipop and then kitkat). XDE starts and the screen displays OS is starting.... It stays like that for quite a while until it displays
The emulator is unable to connect to the device operating system;
The device did not response to the connect request.
Some functionalities might be disabled'
After closing the dialog, it stays there forever until I kill the emulator. Killing the emulator triggers an error from visual studio.
Could not start emulated device 'VS Emulator Lollipop Phone'.
When I open hyper-v, I see the vm in the list and shown as running. When I connect, I see the console screen as below
I know this issue has been around for a while now, but I have just found a new solution for people who may still encounter this issue...
I had the same issue (stuck on "OS Is Starting") for API v 21 & 22. API v23 images would start, but could not debug - the app would crash as soon as it launched.
The following fixed the issue:
Shut down the emulator
Open Hyper-V manager
Go to the settings for the Android Image
Expand the "Processor" configuration node
Go to the "Compatibility" node
Check the "Migrate to a physical computer with a different processor version" option
Apparently it has something to do with newer Processor architectures being incompatible with the Android images or something like that - don't really care, as long as it works :)
I was running into the same issue. I did try to disable OpenGL by deleting: GuestDisplayProvider = "VsEmulator.OpenGLGuestDisplay" in xdesku.xml, as suggested in other answers.
At first, the virtual machine would boot up (you could connect to it from Hyper-V manager), but the emulator window itself would not connect to the machine (stuck on "OS is starting", then failing after a looooong while with the following message: "The emulator is unable to connect to the device operating system: Couldn't auto-detect the guest system IP address. Some functionality might be disabled.")
This answer https://stackoverflow.com/a/31698124/1010492 and that one https://stackoverflow.com/a/14402740/1010492 helped me solve the connectivity issue, and I was able to have the Virtual Machine displayed inside the emulator window.
However, the emulator wasn't working properly (scaling issues, no Home, Back, etc. buttons) until I put back the line "VsEmulator.OpenGLGuestDisplay" and after removing my profiles and rebooting a number of times.
To sum up, if you are encountering the same issue on an Hyper-V enabled computer, you may want to try the --over conscious-- following steps:
Ideally, uninstall any other Virtualisation software such as VMWare, Virtual Box and VPN clients such as Cisco VPN (if you cannot
do that, please be vigilant at step 13)
Reboot
In the "Visual Studio Emulator for Android" dialog, delete all installed device profiles
Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches
Run XdeCleanup.exe (usually in "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0")
Also remove any extra virtual network adapters left in "Control Panel > Network and Internet > Network Connections" (after following
the previous steps, you should normally be left with only physical
adapters)
Make sure Network Sharing is disabled on all network adapters (right click, Properties, Sharing, untick "Allow other network users
to connect through this computer's Internet connection")
If ever you deleted the line GuestDisplayProvider="VsEmulator.OpenGLGuestDisplay" in xdesku.xml
(usually in "C:\Program Files (x86)\Microsoft
XDE\10.0.10240.0\SKUs\Android"), NOW IS A GOOD TIME TO PUT IN BACK.
Reboot
You may want to try to repair the emulators: go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and
hit "Repair" (although I have to say this always fails for me)
Reboot
Open the Visual Studio Emulator for Android, and install then run one of the profiles (eg: 7'' KitKat (4.4) XHDPI Tablet -- Similar to
Asus Google Nexus 7)
It may already work, but if not you should make sure that your network adapters are setup properly. Stop your emulator, then Go to
Control Panel > Network and Internet > Network Connections, and right
click the vEthernet adapters, then Properties and make sure you only
have the following boxes ticked in the Networking list (as explained
in Interference from other virtualization or networking software and
drivers: Client for Microsoft Networks, QoS Packet Scheduler, File
and Printer Sharing for Microsoft Networks, Microsoft LLDP Protocol
Driver, Link-Layer Topology Discovery Mapper I/O Driver, Link-Layer
Topology Discovery Responder, Internet Protocol Version 6 (TCP/IPv6),
Internet Protocol Version 4 (TCP/IPv4)
Reboot
Try to start the emulator again in "Visual Studio Emulator for Android"
If it still doesn't work, try to delete and recreate the profiles, and loads of reboots...
There are probably some redundants steps here, but I think it covers everything you should try (the key seems to be making sure that the network adapters are setup properly). If I've missing some things or if you think some steps are useless, please comment.
After alot of searching I got this working. Hope this helps. I found it in the comments on MSDN Article for Android Emulator with Visual Studio 2015
The new images might work if you disable OpenGL by going to Program Files (or Program Files x86 if you're on a 64-bit machine) \ Microsoft XDE \ 10.0.0.0 \ SKUs \ Android \ xdesku.xml and deleting this line: GuestDisplayProvider = "VsEmulator.OpenGLGuestDisplay". However, without OpenGL turned on you will not be able to take advantage of many of the new features
On my system I got it working again after enabling the disabled vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) again.
I didn't have to reboot.
I went through the steps in #Gyum Fox answer and still no joy for me.
While the Visual Studio Emulator for Android creates the first emulator instance, several virtual network switches are also created. For a laptop, typically three vEthernet instances are created; one for the wired LAN, one for the Wi-Fi, and another internal virtual switch for guest to host connections.
In my case, the vEthernet for the wired LAN was created successfully and then the Visual Studio Emulator for Android process would hang. This is observable from the Hyper-V Manager and the Virtual Switch Manager action.
Using the Virtual Switch Manager I successfully created the missing Wi-Fi virtual switch with these steps. Well, ultimately it worked. Read on.
Under the Virtual Switches list, select New virtual network switch…
Under What type of virtual switch do you want to create?, select External.
Under the External network: drop-down, select the Wi-Fi adapter.
Click the Create Virtual Switch button.
Change the Name: to match the name of your Wi-Fi adapter.
Click the Apply button.
In my case though, after clicking Apply, a failure message indicated the Wi-Fi adapter was bridged. Hmmm.
I started the View Network Connections control panel applet and the Wi-Fi adapter did not show it was bridged. (When a network bridge exists, the Status column has the word Bridged appended.) I suspect there was some dusty digital bits lurking somewhere in the registry.
Here is what cleared the issue for me.
Right-click on the Wi-Fi device.
Select Add to Bridge.
Right-click on the Wi-Fi device, again.
Select Remove from Bridge.
Now, go back up to the steps to create the virtual switch for the Wi-Fi network. The steps should complete successfully now.
And now, you can go back to creating the Android emulators you want.
One final thought… If you aren’t seeing any virtual switches being created, I suspect that could mean the wired LAN might have the dusty digital bits hanging you up. In that case, I’d try add-and-remove-from-bridge trick on the wired LAN adapter to see if that clear things up for you.
And, now I suppose that just doing the add-and-remove-from-bridge trick on the network adapter without creating the virtual switch might suffice. For me, the creation of the virtual switch was proof that the issue was corrected. YMMV ;-)
I found my issue was related to the windows firewall with some enterprise policies my company applied to all PCs. Once I stopped the Windows Firewall service it worked just fine.
I also had this issue and it was not just for android emulators but for all windows phone emulators.
This is what i did to fix the issue
Uninstall the Genymotion and Virtual Box (I had these in my system and this did not solve the issue)
Removed all Virtual adapters. this is the tricky part. None of adapters could not delete from Hyper-V virtual Manager. I had to use powershell and run
remove-vmswitch -Name "The name of V Adapter" -force
Also, from this I was not able to delete all the adapters and I found this link "https://social.technet.microsoft.com/Forums/windowsserver/en-US/e49df568-4f4c-47b7-b30c-952d1e26ca58/cant-remove-failed-virtual-switch-from-hypervs-virtual-switch-manager?forum=winserverhyperv" and deleted all virtual adapters
reboot the computer
After this there was not any v adapters in Hyper-V virtual Manager
Run the XdeCleanup.exe (just in case)
Also, I disabled the firewall from my virus guard
After this I was able to run the emulator from "Visual Studio Emulators for Android"
I'm adding a separate answer though the insight provided by Gyum Fox provided the clues I needed to try other stuff ...
[NOTE: The last time I was able to use the emulators (~3 weeks ago) I had wireless disabled and was using a wired connection on my Dev laptop. I ran out of space on my switch so re-enabled the wireless as the sole connectivity option. This may be totally coincidental, but read on and I'll let y'all decide.]
After following Gyum's steps without success, I decided to turn off the wireless and then try launching the emulator.
Wouldn't you know it ... it worked without an issue! 8-}
Once I had the emulator running, I re-enabled the wireless and the emulator picked up the connectivity.
I'm not a network guy so I'm not even gonna attempt to understand. It's a minor PITA but hey ... if it works!!! ;-}
On my machine I could start the emulator but I got an OpenGL error when trying to deploy and debug. I realized my issues started after I installed Docker. On a whim I decided to shut down Docker and disable the vEthernet (DockerNAT) Network Connection. This fixed my issue. Now, whenever I need to use the Andoird emulator I have to shut down Docker. Then when I'm done debugging I enable/restart Docker.
One of the reason I was having this issue is that I did not install the Android SDK on the default location. So I had to follow these instructions in order to be able to debug my application: https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB
I had to create the folder "Android SDK Tools" and add the Key "Path" with the value to my SDK, which in my case it was "E:\Android\Android_SDK"

Test android app on Virtual Box from Android studio

I have a very specific problem. I am trying to create an Android app for educational purposes, together with a friend of mine. The problem is, my processor does not support VT-x, which is essential for using an AVD, and my Android phone is considerably old so it can't really take much.
Therefore, the one solution I have in mind is using VirtualBox to create a 32-bit Android Virtual Machine and test my app there.
The problem is that, unlike an actual Android device and an AVD, a VirtualBox Android VM does not have, for what my knowledge is, an obvious way of being connected with Android Studio for testing each new app build.
So, what I am asking for is exactly that: a way to immediately test the app I have written in Android Studio in my Android Virtual Machine I have created on VirtualBox, including any workarounds that effectively allow me to immediately test the app on the VM, other than finding a way to make adb work with it.
I see I'm a bit late on this one but I figured it out. I am using Windows 8, running Android x86 (4.4 r1) on VirtualBox.
1. Set up a Host-Only adapter so that the VM has access to your network; You can set this up only when the Android image is off. Basically just go into your settings, click on Network, and select Host-Only Adapter in the drop-down labeled Attached to. For Adapter Type select PCnet-FAST III. Check the box next to Cable Connected if it isn't already.
2. Set up an NAT Adapter by selecting a different Adapter tab and for Attached to select NAT. For Adapter Type select PCnet-FAST III again. Check the box next to Cable Connected if it isn't already.
3. Enable Developer Mode by starting up the Android image, then going to Settings > About phone/tablet > Build Number. Click on Build Number 7 times. You should see a pop up that tells you how many more times you need to click to get into Developer mode. Credit to RMP PianoTuning's answer below
4. Get the virtual Android's IP address by going into Settings > About phone/tablet > Status > and then scrolling down until you find your local IP Address. Remember this number, you'll need it for the next step.
5. Start up Android Studio and go into the console; it should be one of the options in the bottom-left corner. Type in adb connect (IP address from step 4). Take a deep breath and hit enter. If it says
connected to (IP address)
you are ready to rock! When you run the app within Android Studio, your virtual Android should appear as Innotek GmbH VirtualBox, or something like the same. Select that puppy and enjoy your new, easy-to-test-on emulator. Its even Bluetooth Compatible! (but thats a whole 'nother story... google it)
Now a virtualbox isn't an answer to your need.
here are some alternatives,
Genymotion http://www.genymotion.com/ which is an easy to use android emulator , i suggest you look into it. based on virtualbox , can be integrated into android studio with ease . needs an AMD-V proc if not a VT-x . If the processor does not support these, the emulator still works, but your emulated device will only be able to use one CPU.
The other option is adb over wifi, which will let you use your phone without doing the dropbox step http://forum.xda-developers.com/showthread.php?t=1685736. For this to work you will need root though.
I was able to follow OMiKeY steps and get my app to run in VirtualBox,
the part he leaves out:
In your Android simulated device, you have to enable Developer mode.
Goto 'Settings' -> About Phone/Tablet->Build Number.
click on Build Number 7 times.
For me I got pop up that told me how many more times I needed to click to get into Developer mode.
After that i re ran the adb connect XXX.XXX.XXX.XXX command
Here's how it works for me.
I just connect my android phone with USB to my host (Windows 10).
Then make sure the USB phone is found from within the guest OS (ubuntu desktop 18.04 in VirtualBox 6.0). (VirtualbBox app: Devices > USB > check the USB corresponding to my phone). Once it's recognized by ubuntu, there will be a phone icon showing up on the desktop screen.
Next, I start android studio (v3.3.2); once that is complete, from the Terminal window (Android studio: View > Tool Windows > Terminal), I type in: adb devices, which would list the devices attached and my phone is on the list.
Now I run the app for a test (monitor my phone and confirm if there's prompt)...and the app shows up on my phone. Hope this may of help for others.
If you are running Windows, open the specific port in Firewall. In VirtualBox in your Android instalation Settings->Network Adapter 2 Tab - Port Fowarding and create a rule with Protocol (TCP) - Host IP (Your IP) - Host Port (in my case 5555) - Guest IP (Same Step 4 - Check your IP ) - Guest Port (I put the 5555 too). Ok! Now I can run my Apps in VM.
AppData\Local\Android\Sdk\platform-tools>adb connect 192.168.0.101
connected to 192.168.0.101:5555
Running devices:
innotek GmbH VirtualBox
:-)

Genymotion Android 4.4.2 Api 19 doesn't boot anymore

I'm using Genymotion with 4.4.2 API19 custom phone 7. Genymotion is not able to boot. So I boot from the virtual box. After a untracked pid series on the virtual box, it starts the android logo, the disk light show some activity, but nothing happen. I've tried everything from you suggestions. What could I do now? Any idea is well accepted! Thanks in advance! best regards Paul.
I had a similar problem, but wouldn't even see the Android logo. It turned out to be caused by connecting to the VPN at my workplace.
The reason for that is because the DHCP server range used by my VirtualBox host-only adapter was in conflict with that on the network at work.
Preferences -> Network -> Host-only Networks -> Double-click -> change the IP address and DHCP server to different values. Then reboot your host machine to ensure the setting change it applied (VirtualBox won't apply the changes until all VMs using the network are closed, and some processes seem to hang around for some time).
Open your virtual box and power off your virtual device , and then open genymotion and delete your device and add it again , if you add your previous device exactly , there will not need to any download

GenyMotion Unable to start the Genymotion virtual device

When I run Genymotion, I get the following error:
Unable to start the Genymotion virtual device.
Unable to configure the network adapter for the virtual device.
Please, check the following points:
From VirtualBox, in the main parameters of software, check a network adapter "Host-only" is present.
From VirtualBox, in the Genymotion virtual device parameters, check the first network interface has the type "Host-only". If no, then set this parameter manually.
How can I fix that?
Update: Before you read further, I want to notice that I didn't have any problems since I upgraded VirtualBox to 4.3.4.
I use VirtualBox 4.3.2 under Ubuntu 13.10. I had same issue after upgrading from Genymotion 2.0.0 to 2.0.1.
These are the steps I followed to fix this, although I'm not sure which one works for you.
Step 1. Start VirtualBox, go to menu File/Preferences menu, go to Network section, select Host-only Networks tab.
If you don't have any adapter defined, then you can create one (as indicated below) or you can ignore step 1 and Genymotion will create it when you try to start the VM.
If you do have an adapter there (vboxnet0) click the edit button. In the edit window, you must have DHCP server enabled AND the IP address and allocation pool of the server must be inside same network as the IP of the network controller. For example, I use:
IPv4 address/netmask: 192.168.56.1/255.255.255.0 (on Adapter tab)
DHCP server enabled checked (on DHCP server tab)
Server address/netmask: 192.168.56.100/255.255.255.0
Server lower/upper address: 192.168.56.100/192.168.56.254
Still in VirtualBox, select the Android VM you have, click Settings button, select Network section. In the Adapter 1 tab, you should have:
Enable network adapter checked
Attached to: Host-only adapter
Name: vboxnet0
Normally, if you have all these settings, it should work ok, but it didn't for me. So I moved to step 2.
Step 2. As indicated by Genymotion, start VirtualBox, go to menu File/Preferences menu, go to Network section, select Host-only Networks tab and delete the defined adapters.
Start your VM in Genymotion. Genymotion will recreate the adapter with proper settings (as described in step 1)
Normally, if step 1 didn't work for you, step 2 should work ok, but it didn't for me. So I moved to step 3.
Step 3. Delete and recreate the Android VM in Genymotion (VirtualBox host-only network settings I left as described in step 1).
This solved my issue and Android VM works ok now. Good luck.
Andrei.
Update: A day after posting answer, when I was first starting a VM in genymotion, it gave again same error again and vboxnetdhcp process crashed (and restarted). On second and later start attempts it worked ok. So it might still be some minor issue there with VirtualBox DHCP process.
Update: The issue seems to reside in virtual Box DHCP server which crashes:
/usr/lib/virtualbox/VBoxNetDHCP --network HostInterfaceNetworking-vboxnet0 --trunk-type netflt --trunk-name vboxnet0 --mac-address 08:00:27:72:4C:7B --ip-address 192.168.56.100 --netmask 255.255.255.0 --verbose
Floating point exception (core dumped)
Deleting and recreating the VM fixed again the issue. Maybe Genymotion sends some invalid data to VBox DHCP that makes it crash (still a VBox bug though).
If as me you've tried everything above (especially windows 10 users ) and nothing helped here is what eventually solved the issue. The solution was ridiculously easy but took a day to figure it out.
Recommended to remove host only network adapter from virtual box, to do that open virtual box File->Preferences->Network->select tab host only network adapter->remove all (no worries when you start a vm from genymotion it will create new). Now open Genymotion and try to start your virtual device. Get the error ? that's good follow second step
(What actually fixed the issue) Go to Control Panel->Network and Internet->Network Connections, on there you should see an Ethernet network adapter that virtual box created ( it was created automatically when you started device from genymotion), so right click on it then Properties then CHECK VirtualBox NDIS6 Bridged Networking Driver, see image attached.
You're done. Start your device from genymotion, should work now.
Follow following step to work genemotion like charm.
Open Oracle VM virtual Box
File -> Preferences ( ctrl + g ) -> open one dialog box -> select Network -> select Host only network choose you adapter ( there are three button on right side -add -remove -Edit host only nw.,
If you dont have any adapter then create.
After selecting your adapater choose Edit Edit host only network(space)
Open one dialog box then choose DHCP server choose Enable Server and fill all ip addresses.
like
IPv4 address/netmask: 192.168.56.1/255.255.255.0 (on Adapter tab)
DHCP server enabled checked (on DHCP server tab)
Server address/netmask: 192.168.56.100/255.255.255.0
Server lower/upper address: 192.168.56.100/192.168.56.254
Give ok.
In starting of the oracle virtual machine there are different tab like General ,system , Display ,storage,Network etc.. Click on Network
Open one dialog box, select Enable Network adapter attached to ->host only network
and main thing is that in Name tab, choose adapter that you are choosing in preference both adapter much be match example you choose virtualbox...2 then here also choose that one.
Ok.
Now play your genemotion. if again error come then again restart to play you succedd.
:)
See full video here to see above all step and work well with genemotion.
https://www.youtube.com/watch?v=YuJ6ZfudFp8
I had exactly the same problem as you, tried everything, but the solution is really easy:
Open Network and Sharing Center
Change adapter settings
Right click your Virtualbox host-only adapter and select Properties
Enable "Virtualbox NDIS6 Bridget Networking Driver"
I'm running OSX. The solutions suggested didn't work for me. I'm using OSX Yosemite. I restarted my Mac then I uninstalled VirtualBox by launching the uninstall script (which is shown when you launch the dmg of VirtualBox) then reinstalled it. I also uninstalled and reinstalled Genymotion. Now everything is working smooth.
I was struggling with this for a while and finally found a solution on Windows 10.
Steps:
Network and Sharing Center > Change Adapter Settings > Right Click on VirtualBox Host-Only Network ( If you have multiple do the following to all of them ) > Properties > Check the VirtualBox NDUS6 Bridged Networking Driver
In my case, the only option was to remove the VM and download it again. No re-configuration of the host-only adapter did not help, I used different addressing of DHCP. Virtual Box I updated to version 4.3.4 and Genymotion to 2.0.2
After you have updated the latest GenyMotion Version to 2.10 from 2.02...
Open GenyMotion
Go to the List of your 2.02 Devices
Left click the item and then right click on the menu to **Delete all your 2.02 Virtual Devices
Click the Add button at the top to add a New Device. Log into your account
Select the device you want. You can only select one device at a time
Click the Next button. Notice the Version number says - 2.10. There is other info about the device here.
Your device will start downloading to your GenyMotion Folder on the Drive **C.
8 After you download it, double click it to open up the Virtual Device like you normally would.
Repeat for other device you want
** C:\%Users%\AppData\Local\Genymobile\Genymotion\deployed
I know this post is old, but in case someone is searching google i think i should mention what fixed my problem. After the 3 steps from above the error message was gone but the screen still stayed black and opening an .apk got stuck on file transfer. It had something to do with a VPN application (in my case Hamachi). I just closed it and then the emulator ran fine. This post prompted me to do so: https://groups.google.com/forum/#!searchin/genymotion-users/network/genymotion-users/QAX_UrAzEn0/o947IXpsDuIJ
I had the same problem and tired all the above solutions and did not work for me!
the problem was because multiple networks make conflict between VMware and VirtualBox, and other VPN connections.
The solution i followed is:
solution 1 :
uninstall virtualbox and reinstall the last update of it
solution 2 :
If solution 1 not working, try this uninstalling all VPN programs, VirtualBox, Genymotion and reinstalled VirtualBox and Genymotion again.
both solutions worked with me
Firewall might be the cause, just try disabling it
In my case it was due to the firewall. I tried all these suggestions in the answers and none of them worked for me. Finally I disabled the firewall It worked for me.
For windows users: Disable Hyper-V and its tools
If you are a windows user, the problem might simply be because of having multiple virtualization technologies in your system.
You might be having Hyper-V and its related features enabled. Just simply turning them off and rebooting your system can do you help sometimes.
Here is how you do it:
Fire up Run (Ctrl+R)
Type appwiz.cpl and press enter
Head over to Turn Windows features on or off
Find Hyper-V and deselect everything under it.
Press Ok and give your system a restart.
Fireup your genymotion and check to see if it works again.
If there is an error prompt saying something like DHCP cant assign IP... just try restarting your genymotion application.
This problem occured for me one time when I had already opened the built-in Android Emulator (AVD). Check if you turned off it before start changing anything in settings.
For VIrtual Box 5.x - the settings from above comments are set automatically
Now for the error:
1.Make sure that you have enough Processor(s) and Base Memory - so the PC can support VM configuration(I use 1 procesor and 1024MB for all VM's)
2.Delete any unused VM from Genymotion and Oracle VirtualBox Manager - seems to reserve their configuration, though you use it or not(that specific VM)
I had a same kind of issue starting Genymotion on Ubuntu 16.04 and solved it in this way https://medium.com/#avanvitharana/genymotion-on-ubuntu-16-04-cb8ef8fc70e9#.6y0bgmmjb
it worked for me when I start Gennymotion in Admin mode
Also make sure to update your Oracle VM Virtual Box. I tried everything but later realized that the issue was due to the use of older version of Virtual Box.
The number of CPUs is insufficient. Select 1 CPU in Genymotion and restart the device.
Please download new Virtual Box and Install it.
For Download Virtual Box use below link:
https://www.virtualbox.org/wiki/Downloads
These works for me.
You should run Genymotion as root under Linux:
sudo ./genymotion
I have installed Genymotion as a regular user, and got the same nasty VM complaints of not being able to initialize KVM cause it's being taken by some other application. The solution was to start Genymotion by the root user, remember: you'll have to download all the smartphone images once again.
If all the other answers here fail (you can check that you have a correctly created host-only network in VirtualBox, which is basically what other answers here come down to):
https://stackoverflow.com/a/33733454/586754 (with screenshot) worked for me.
Basically, go to Windows network adapter settings for the "VirtualBox Host-Only Ethernet Adapter" and check "VirtualBox NDIS6 Bridged Networking Driver".
This made both Genymotion and Xamarin Android Player work again.

Categories

Resources