I've setup the latest Xamarin Android Player (XAP) on my AMD64 server running Windows Server 2012
Hyper V has been uninstalled.
Before doing so I uninstalled Virtual Box and let XAP install its version.
When I start XAP with device Nexus 7 Lollipop it boots to the Android logo and goes no further.
What is wrong?
You need to post errors and logs.
VirtualBox should be installed I believe for the Android Xamarin emulator to work.
However, you could try reinstalling the Android player. Make sure virtualization is enabled in bios.
If worse comes to worse, you can install the Android AVD manager and use the normal Android emulator which also works on Xamarin.
The Xamarin Android Player is still in preview, any issues with can be addressed with bug report at https://bugzilla.xamarin.com/newbug
Please include the logs when you file a bug, you can generate logs by Right-click bottom bar > Generate Bug Report
In the meantime, I would recommend you to use Visual Studio Android emulators
In addition to what Prashant suggests, you can also try a different simulator image. Some of the XAP device images seem to be unable to boot properly on some machines. I've not seen any issues under OSX version of XAP, but the Windows version seems to be affected on some systems.
Related
i'm using android studio in windows server 2016 and have next problem: for work task i need to start android device emulation. On windows 10 emulator works fine, but same steps on windows server cause problem -"the emulator process for AVD_Pixel3A was killed". What should i do?
p.s: hyper-V components not installed, virtualization is accessable.
You will need to to have the H-visuals turned on.. Also check to see that you have HAX installed. Also be sure to turn on developer mode within the computer... I would also run the program on a physical android device to see if you get the same issue.
Also if none of these work you might have to check to see if the server runs the minimum requirements. If it does you may have to reinstall Android Studio. I had this happened to me the other day. I uninstalled and reinstalled Android Studio and it fixed the issue.
I am working with Ionic Cordova project and trying to run emulator. I am using trial version of windows 10 pro, till now didn't put license, it is trial only. though Android studio, Java sdk, and Android-SDK installed correctly but when trying to start emulator (for a correctly created virtual image) it is failing to start. It is visible for 1 seconds after that it is never visible. In-fact event viewer also not showing any error log. is it due to trial version of win 10 pro? I have no clue why it is happening?
I have tried by both installing hyper-v and once unstalling hyper-v, but none worked. I am not sure if hyper-v feature should be on or off. What is correct way?
How did you install the emulators and SDK exactly? What Android SDK version is the emulator based on? Are you really using Visual Studio and the Tools for Apache Cordova? What VS version, cordova and cordova-android versions?
If you see emulator icon, but don't see window, just recreate emulator. This is because of bugs with emulator position (when emulator window is off-screen).
Anyway, try recreating virtual device
Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.
I'm having trouble getting any android emulator other than "Xamarin Android Player" to work (only with older versions of android).
What kind of virtual device/settings/properties should I use so that I can test newer versions of android and not have to wait 15 minutes for the emulator to startup?
is there a "Go-to" virtual device/emulator setup that doesn't take 15+ minutes to load?
(using windows 10/Visual Studio 17/2015)
The Xamarin android player has been discontinued for a while. As a visual studio user you should probably be moving onto the Visual Studio Android Emulator. There is a guide here on setup
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/
it is also available with visual studio 2017, and if i remember correctly is an option available in the Vs2017 installer.
I highly suggest Genymotion for most uses. You can download the free version which works well for most basic things (there are also a few small things you can do using the adb command prompt without having to buy the full version, such as taking screenshots).
Link to free version
They have a good list of different devices. I have also recently even got it successfully connecting to my Parallels Windows machine while the emulator is running on my Mac. Let me know if you need help with this specific scenario.
The other option for you is the Visual Studio Android Emulator. When it first cam out I tried using it but was not able to because I would need to run it on a Parallels VM which does not allow nested virtualization.
I recently got into Xamarin development. I have a lot of experience in Xcode making iOS apps and the iOS side was very straight forward. Now I'm trying to implement Android. I downloaded a Hello World example to get my bearings. When I run it I have no problems getting the simulator to show up (MonoForAndroid_API_10 and MonoForAndroid_API_12) but the actual application doesn't run, and does not show up anywhere on the simulator. Essentially whenever I use run or run with in Xamarin on Android, it pulls up a fully functioning, albeit empty simulator.
How do I get my application to run on the emulator?
Like the other commenters, this is most likely just a symptom of slow emulator on your machine. I'm running Xamarin-Android development on my 2010-era OSX machine in mavericks with 8GB RAM, and it is slow-slow-slow, but usable. Try to find the Intel x86 speeds improvements (look for HAXM) and you will find that the emulator will be much much faster.
And yeah, get a real handset and plug it in to your computer: always much faster than emulation.
later edit Get Genymotion for Mac OSX or for PC/Windows or PC/Linux. It's way way way faster than the other emulators. I have since found that this is as fast, or faster, than running the App on my connected Android phone. It's certainly simpler in not having to have the device plugged into one of my USB ports, and allows me to code and test on the train. http://www.genymotion.com/
Don't know if my issue was the same but finally this troubleshooting helped me to run emulator https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB.
I was missing key Android SDK Tools with string value Path in registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
I've created it manually and it worked.
UPDATE
Before I got the issue with running emulator, I couldn't see it in Visual Studio. The reason was I've installed VS Android Emulator through standalone installation, not through VS Installer. It had to be installed there as well.
I had the similar issue, and then I deleted the existing device simulator and reinstalled again and it started working.
As I use a different SDK, in my case
Go to Tools > Options > Xamarin and set the Android SDK path.
Sometime Visual Studio changes this configuration;
2020 Update:
I followed the most voted comment, however, with Visual Studio 2019 updated recently, the steps have changed a little. Here is what previously worked:
WHAT WORKED BEFORE
"Don't know if my issue was the same but finally this troubleshooting helped me to run emulator https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB. I was missing key Android SDK Tools with string value Path in registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
I've created it manually and it worked."
WHAT TO DO INSTEAD
Nothing. Don't mess with the path.
WHAT WORKED BEFORE
"Before I got the issue with running emulator, I couldn't see it in Visual Studio. The reason was I've installed VS Android Emulator through standalone installation, not through VS Installer. It had to be installed there as well."
Previous instructions image
WHAT TO DO INSTEAD
a. Go to Tools located at the top of the VS window, Get Tools and Features, go to Individual components, using the search tool in the pop up box, search "emulator", once you get the result, make sure both Google Android Emulator (API Level 25)(local install) and Intel Hardware Accelerated Execution Manager (HAXM) (local install) are both checked.
b. Close the solution(s) and restart VS then reopen the solution(s).
c. To deploy the app on the emulator, click Start button to spin up the emulator, left click on your Android project, then click Deploy. You should be able to see your app on your emulator's app menu.
Updated Instructions image
Worked for ME
Sometimes you close the android Emulator but not POWEROFF the Emulator.
this problem happens when emulator shutdown un-properly.
Restart Your EMULATOR
First start your emulator
Then restart your emulator by pressing down the power button and select restart option in your android emulator.
I enabled Hyper-V acceleration based on microsoft documentations: https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin&pivots=windows#accelerating-with-hyper-v
Basically you need to turn on these two windows features from the control panel (Turn windows features on of off):
Hyper-V.
Windows hypervisor platform.
then from visual studio go to: Tools >> Android >> Android SDK manager >> Tools >> make sure that "Android emulator" version is 27.0.1 or higher, if not, you will find in the same screen a button below to update it.
I did this on windows 10 64-bit, with VS 2017 Community 15.9.5