Connecting VS 2015 to Xamarin Android Player - android

Please I have been battling with this for like 2 days now,
pls I am having issues installing connecting my VS 2015 to Xamarin android player.
I have installed
VS 2015
List item
Xamarin Android Player
Enabled Virtualization in my BIOS (windows 10)
Installed Android Studio
Downloaded all the devices I need for debugging in my Xamarin Player.
Oracle VM VirtualBox 5.0.20
I don't know what else to do sir.
it keeps telling me 'Failed to initialized device Nexux 4 (Jelly Bean)'

This helped me to resolve the similar error :
Delete the c:\ProgramData\XamarinAndroidPlayer folder, before reinstalling.
Edit the installeddevices.json files and replace the content with {'machines':[]} to avoid re-installation and to clear all the devices listed.
You'd probably also want to clear out the device vdi folders too.
Solution by #SunnyOkoroAwa after a small discussion.
After the installation of the files I listed above.
Navigate to Network Connections in Control Panel.
Right click on Virtual Box Host-Only Network.
Select Properties.
Check the option VirtualBox NDIS6 Bridge Networking Driver.
Reconnect the network.

Related

Running AVD(android virtual Devices)in esxi 5.5 type-I hypervisor [duplicate]

Can I run Android Studio and Android SDK emulator in a Microsoft hyper-v virtual machine? Please read carefully.
I already use Hyper-V a lot for other purposes. Now I need to develop a app for Android.
I've installed a new virtual machine (windows 10) and installed Android Studio. I cannot run the android emulator because it's lacking the 'intel HAXM software'.
I read a lot about that it's not possible to install Hyper-V NEXT to Android Studio, but non of the post actually say anything about installing in a Hyper-V machine.
Refer to this link:
How to run Android Studio on Windows without disabling Hyper-V
The solution (if you do not want to disable Hyper-V) is to use Microsoft’s Android emulator, which is a free download here.
In order to use this with Android Studio, you need to run the emulator first. Then, in Android Studio, go to Run > Edit Configurations... and select Show Device Chooser Dialog under Deployment Target Options.
Run your project, and select the VS Emulator, ignoring the invitation to “Turn off Hyper-V”.
Hyper-V added support for nested virtualization in the Windows 10 Anniversary Update (released August 2016) and Windows Server 2016. However, the only Microsoft-supported usage of nested virtualization is running Hyper-V within the VM, not HAXM. From the official documentation, "Virtualization applications other than Hyper-V are not supported in Hyper-V virtual machines, and are likely to fail."
That said, the change log for the latest release of HAXM reports that Intel "Fixed an issue with Hyper-V nested virtualization support, which had prevented Android Emulator from booting." So while it isn't supported by Microsoft, it seems running HAXM nested in a Hyper-V VM may be possible.
If that's the case, to get HAXM working in a Hyper-V VM, you will need to enable nesting for that VM. Run this command on the VM while it is in the OFF state:
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
After that, you should be able to install the latest version of HAXM within the VM, allowing use of the Android Emulator. Again, I haven't personally verified this, and it isn't supported by Microsoft, so your mileage may vary.
Full disclosure: I work at Microsoft on the Hyper-V team.
[Edit 7/2/2018]: Android Emulator support for Hyper-V acceleration was announced earlier this year, and is currently in preview. See the announcement post for details.
Microsoft posted a link to allow Hyper-V as hardware accelerator for android emulator run in windows.
The link is here
Here is the instructions.
Enter About in the Windows search box.
Select About your PC in the search results.
Scroll down in the About dialog to the Windows specifications section.
Verify that the Version is at least 1803.
Enter windows features in the Windows search box and make sure both Hyper-V and Windows Hypervisor Platform are checked.
Open SDK manager in Android Studio, make sure your Android Emulator version is at least 27.2.7.
Restart your computer, and relaunch your Android Emulator in AVD Manager in Android Studio.
Confirmed: Running Windows 10 version 1803, with Hyper-V and Windows Hypervisor platform enabled, Android Studio's Emulator works. I am using Android Studio 3.2.1 and Android Emulator 28.0.22.
Just make sure before you start with the steps suggested by lotosbin you complete the following:
Open an admin command prompt and enter the following; then restart the emulator.
`reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools" /v Path /d %localappdata%\Android\sdk`
Or update the registry manually:
In regedit, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node.
Create a new key named Android SDK Tools(if not there already).
Navigate to that key.
Create a new string value named Path. Set its value to the location of your Android SDK, which will be like C:\Users\YourName\AppData\Local\Android\sdk.
Microsoft has announced a better solution
Today, at Build 2018, we announced a preview of the Google Android
emulator that’s compatible with Hyper-V, available on the Windows 10
April 2018 Update. This enables developers with Hyper-V enabled on
their machines to use a hardware accelerated Android emulator, without
needing to switch to Intel’s HAXM hypervisor. Amazing work was done by
the Windows Hyper-V team, with help from the Xamarin team, to make to
this happen.
Just to complement #lotosbin's answer and add an additional information. This information is regarding when you are trying to start your app in Microsoft's standalone Android emulator from Android Studio.
On the Select Deployment Target window there are two sections namely:
Connected Devices - It shows up physical android devices attached to your computer through USB port e.g. mobile, tablet if you want to deploy your app into an actual device
Available Virtual Devices - It shows up Android virtual emulators which are build from specific device definition e.g. Nexus 5X API 28
Interestingly, Microsoft's Android emulator shows up in Connected Devices section. So Android Studio treats Microsoft's Android emulator as a physical device instead even though it is a virtual emulator only. Please see the screenshot below:
Additionally, you can check the health and current status of Microsoft's Android emulator inside Hyper-V Manager also as shown in below screenshot:

Genymotion is not working in Windows 10 for Android Emulator

I have tried everything(reinstalled, open as administrator, etc) and it's still not opening the Android 5.x and 6.x emulator.
The error message is :
Unable to start the virtual device.
The virtual device got no IP address.
The VirtualBox DHCP server has not assigned an IP address to the virtual device. To find a solution, please start Virtual Box.
I have followed this tip and this but the error message keeps.
I'm using a Windows 10 Pro.
Any other tip without the need of reinstalling the Windows?
Update:
Hey man I think I caught your problem.
1) Please Open VirtualBox and and Then right click on your Virutal Machine.
2) Select Settings.
3) Open General Setting from the left panel.
4) Open the Basic tab.
5) Choose Linux from the Type option.
6) Then choose Other Linux(64-bit) in the Version Section.
I have tried the option of 32-bit mode in my PC and the same problem happens as you asked in your question. So, select 64-bit mode to make it run.
Note: Android 5.x and 6.x are based on the 64-bit architecture. If you
selected the Other Linux(32-bit) option. Then Virtual Box will try to
emulate a 64-bit program in a 32-bit virtual machine type, which is
not possible.
So, Please make sure that you have selected the Other Linux(64-bit)
option for Android Versions higher than 5.x. (You can run Android
versions upto 4.x in the 32-bit mode.)
Old Answer:
No, You don't need to reinstall windows. It is not an operating system
fault.
I faced this problem.
It is due to the Antivirus Program.
If you have any antivirus program then just disable it and TRY
AGAIN.
You also don't need to set any compatibility mode.
Currently, I am using Genymotion(Version 2.6.0) and
VirtualBox(Version 5.0.12 r104815) in Windows 10 Pro without any error.

Visual Studio emulator for Android stuck at "OS is starting...", only on API Level 23 / Android 6

Since I read the news about Xamarin now being "free", I immediately installed Visual Studio 2015 Update 2 and the Android tooling (NDKs, SDKs for 19-23, Visual Studio Emulator for Android dated January 2016) to start working on an Android application.
Excited I launched the emulator from Tools -> Visual Studio Emulator for Android and installed the profile that is the best match for my own phone. Since my phone is on Android 6, I decided to get a profile for API Level 23 / Android 6.
Since I had already enabled Hyper-V a few months ago, the installation for the profile only had to add me to the Administrators group and create 2 network adapters.
So far, so good.
Upon starting the emulator, it would stay at "OS is starting...". I figured I'd wait a while. I figured I'd wait a while longer too. After that, I gave up the possibility of it going to work and started investigating.
I also tried other profiles, a few others from API Level 23, one from 22 and one from 19. Only the ones from API Level 23 did not work.
The following steps are what I came up with so far by Googling etc. I tried them in all sorts of combinations:
Rebooting
Disabling / enabling Hyper-V
Removing vEthernet adapters (through the Hyper-V Manager).
Running XDECleanup
Allowing XDE through my Windows Firewall as application (incoming)
Restoring the emulator software in Programs and Features
Enabling / disabling "Processor Compatibility" in Hyper-V Manager.
This is the data I've gathered so far:
A screenshot of the error message that the emulator gives after waiting a long time (10 - 15 minutes, maybe a little longer)
A screenshot of the last part of the log when being connected to the Android 6 VM:
A screenshot of the last part of the log of a working VM (this one's from an Android 4.4 VM):
Responses I've got so far from Microsoft:
-Those errors are normal
-And the only step I've tryed which they told me to, and I don't see here, it's this one:
On Hyper-V Manager, check the option for compatibility under CPU section
Besides from this, just make sure that on Hyper-V you get only 2 switches, the one you use to connect to the internet and the one that the VS Emulator for Android creates, I haven't got any results, but if you try, maybe you will.
In my case, I was mucking around with the VS emulator's virtual switches and had the network adapters in the wrong order.
After I moved the Windows Phone Emulator Internal Switch (Created when first running the VS Emulator) to the first Network Adapter slot in my settings, the emulator started up just fine. Apparently, order matters.
Had the same problem but got mine to work after trying a lot of things from different threads.
In the end I think this did the trick for me:
I added "c:\Program Files (x86)\Microsoft XDE\10.0.10586.0\xde.exe" as an exception in the firewall.
(i also switched of the firewall, but was probably unnecessary)
Temporarly disabled the WiFi device
Uninstalled VirtualBox
Removed all Virtual Switches in Hyper-V
Executed XdeCleanup.exe
Started the emulator again and it started up successfully!
Swiched of the emulator and enabled Firewall, Wifi device.
The emulator still starts successfully every time!
Thanks to all for sharing!
If you're using Xamarin, it's recommended that you use Xamarin Player. It's not Xamarin exclusive, it's just a much faster Android emulator. I use Android Studio, and the Xamarin Player is still faster on boot and launch than the default. This is just my recommendation to you, I have no clue how to fix your Visual Studio emulator, sorry.
I've played a lot with this and realized that I have had manually configured paging file on Windows. After restoring it to default all worked perfectly without messing with the virtual switches or adapters.
Just make sure that you have all Windows memory etc. settings set to default.
Regards, Mladen
My problem was that the system image was missing for the emulator.
When I opened the android virtual device manager it had an exclamation mark next to actions(i had to download the system image via the download link).
I had the same error message. The solution for me was:
Uninstall all emulators in the Visual Studio Emulator for Android
Check in Hyper-V-Manager if there also no instances
Unistall Visual Studio Emulator for Android
Run xdecleanup.exe (C:\Program Files (x86)\Microsoft XDE)
Uninstall Hyper-V from Windows features
Removed virtual ethernet adapters through uninstalling in Device Manager
(be sure to display disabled devices too)
Install Hyper-V from Windows features
Install Visual Studo Emulator for Android again
Download and install your emulator/profile
Run the emulator and have fun :-)
It seems there was a problem with the virtual switches and Hyper-V. The correct settings for the adapter looks like these:
Hyper-V-Manager:
Device Manager:
Network adapter:
Ethernet:
vEthernet (Virtueller Switch: Intel(R) Ethernet Connection (2) I219-LM #2):
vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch):
Emulator network settings:

Alternative of Running Android apps while Intel Visualization technology is not supported

I have installed Android Studio. Now I am trying to install Hardware_Accelerated_Execution_Manager (intelhaxm-android.exe) but i am getting the error
After this Error I tried all solutions which i can get on internet. like UNCHECKING the Hyper-V folder in Enable or Disable Windows Resources and restarting the system.
Then try to enable and install it and got this problem in pic below
Visualization is enabled in BIOS as well.
I also have checked this via securable.exe and got this
After all this I came to know as my knowledge that my computer don't have abilities for this. While my computer is Inspiron 14 (N4050)
Now What i suppose to do ? TO run Apps of android. I also dont have Android phone but I have Iphone. While I have done development of Android on the same this machine With Eclipse and SDK manager. ( A year ago)

Android SDK and AVD Manager issue

I am trying to follow the procedure Downloading the Google USB Driver but see the following error in Android SDK and AVD Manager:
Some packages were found but are not
compatible updates.
I am unable to Download the Google USB Driver without the Google Add-ons.
Specifically, I need Google Usb Driver package revision 4 for the Nexus S.
I ran Eclipse > Help > Check for updates but this did not resolve the issue.
Does the Android SDK and AVD Manager need to be updated another way? If so, how?
Is there some other way to fix this?
Does Google Usb Driver package revision 4 work in Windows XP?
That is ok. Those are shown so since they are probably not meant for your version of adt. When you update your android development tools again and check for updates you will be updated to the latest and then you may update to the tools for the latest version. You may still have that alert message since there will also be updates that are not compatible with your your version of adt.
I guess you need to download your latest version (zip file )of adt then install this new .zip file in eclipse.
Then you would be getting the enabled option to download Google USB driver for nexus S.
Which version of the JRE are you running? I had this problem, updated Java, fixed it immediately. I think I was running OpenJava 1.5, upgraded to 1.6 and it worked.
Have you tried running the sdk manager in admin mode, has seemed to help me in the past with strange errors
After completely uninstalling and re-installing the SDK I was able to see and install the Google USB driver but still have been unable to connect the debugger. Perhaps Android development on an Atom based XP Net-Book is a bad idea. I've not been able to get the emulator working so I thought it might be better debugging directly on the target. The emulator just locks up this PC. I've waited up to 40 minutes before giving up. I've had no trouble with Android development on my work PC (emulator or target) but I have some personal projects I'd rather not do on company equipment. Oh well, I probably just need a real PC if I want to work at home.
Issue - I had a working Android Studio and USB driver would allow me to connect to my Huawei Honor 6X mobile device. One day the Android Studio stopped detecting the mobile device and reinstalling Huawei drivers, uninstalling and reinstalling drivers did not work. I tried changing cables and it did not work either. My Windows 8 would not detect the phone when I connected it with USB and Studio did not detect the device either.
Various solutions posted at the forums did not work for me. Finally this is what I did to solve the issue. My LG mobile also works with the Android Studio and I believe this solution will work for all mobile devices and not just Huawei device
Solution -
1) Open Tools> Android > SDK Manager > SDK Tools tab
2) Select Show package details check box
3) Is Google USB Driver selected? Select it if it is not selected, apply & Ok.
3) If Google USB Driver is selected, unselect it and SDK manager will remove the USB drivers.
4) Close Android Studio and follow the above theps and select the Google USB Driver and let studio update the driver
5)Close Android Studio Again
6) Go to Device Manager and you should see 'Android Composite ADB Interface' if the driver is successfully installed
7) That is it, now open Android Studio & when you run the application you should see your mobile device under Connected Devices

Categories

Resources