I just installed Xamarin Android Player and installed some of the devices as you can see on the following image but I get the error: "Failed to initialize device..." when I try to launch some of the virtual devices.
Any idea on how to solve this?
Xamarin Android Player is good, but it is discontinued. Your issue could be with the version of VirtualBox or a broken android image. Check do you use VirtualBox 5.0.4. You could also try to re-download the android image for the problematic device.
But you have alternatives.
Genymotion is good, but it's paid. There is a free personal version, but if used by a professional, this violates the licence:
"This license is granted to the end user only and exclusively in
connection with personal use, the end user is an individual, and not a
professional, who downloads the application for personal and private
needs, excluding commercial and professional environment."
Visual Studio Android Emulator plays very nice. And allows you run both Android and Windows 10 Mobile apps with full hardware acceleration without any tricky solutions.
Visual Studio Emulator for Android is a component of the
cross-platform tools available in Visual Studio and will be installed
during a custom Visual Studio setup when you select Cross-Platform
Mobile Development, then Common Tools and Software Development Kits,
and then Visual Studio Emulator for Android.
I had the same problem and solved it using the following steps:
Install a newer version of virtual box.
go to virtual box choose your device (nexus 10 in my case).
go to settings > system > motherboard > base memory.
make base memory lower than 2 gigabytes.
start xamarin android player after that and it worked for me.
Related
I am desperately looking, with my friend Google, for the best practical tool to debug on Android - I mean, for real, not with Chrome.
For iOS, Apple came with their Simulator in XCode, which is great because it's replicating the exact behavior of a real device, and you have multiple choices, very handy.
What about Android? Is there something equivalent? Android Studio has been a mess for me, is there something better to advice?
Depends on which environment you're coding in. If you're coding an native app you use Android Studio and it's debugger. If you're coding in React Native you'd use Chrome or React Developer Tools (https://facebook.github.io/react-native/docs/debugging.html), and so forth (Xamarin has its debugger, and the web based options use Chrome I suppose).
AVD (Android Virtual Device) is a part of the Android Studio install and it contains emulators. You can open it without opening Android Studio, if you'd like to. See this thread on how to do it in the terminal (Mac Terminal - How to start Android Virtual Device Manager on CLI?).
For Android we have Android Virtual Device (AVD). You need to ensure Android-Studio is installed. For details creating an AVD refer to this official documentation for step by step guide.
I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!
It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.
You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!
UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!
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 have a few questions and I'm hoping some people could explain it a bit more.
Recently Xamarin has been released to the public for free and you're able to download/install it for free.
Let me say first that I have Windows 7 and Visual Studio 2015 installed on my computer.
I have succesfully installed Xamarin and the Java/Androids SDKs and got it running.
But now I have the following 'problems':
When opening a new Xamarin Forms project I get the following message:
"A problem was encountered creating the sub project 'Projectname.Windows'. This project requires a Visual Studio update to load. Right-click on the project and choose "Download Update"."
Is this because of my OS?
When opening the new project, the 'ProjectName.UWP (Universal Windows)' subproject always give errormessages on everthing.
Reason?
If I want to run the .IOS subproject, is the only way by connection a IOS device? Is there no emulator for example an Iphone?
Thank you.
It's possible that you don't have the SDK / tooling installed for Windows Phone, so you will have to download the update as described in the error message - this should resolve the problem.
What error messages are you receiving?
You need to connect to a Mac over the network which will allow you to build and debug your apps. You can deploy apps to the iOS Simulator on your Mac, or to an iOS device connected to your Mac, from Visual Studio. For more information on using Xamarin.iOS with Visual Studio, I would suggest the following guide: Introduction to Xamarin.iOS for Visual Studio
Regarding your questions.
1. You should check you updates of the Visual Studio. There are a possibilities that the supporting packages can't locate. The error says that you need to download the updates. Nah, it's not about your OS. If you are done installing the visual studio, then your IDE is working properly. The problem persist is whenever you are lack of updates and packages in the give project.
2. The error could be your pc has no windows emulator to support the UWP to run properly. If you have one, uninstall it and install again.
3. You can use emulator, iOS Emulator but you still need a mac. There's a agreement between microsoft and mac regarding this thing. So far, until now, you can't run iOS simulator in Windows without Mac devices with XCODE
I hope it makes sense.
Answers to your Questions
1. it may be a visual studio update issue, try with latest.
2. i think UWP projects are not supporting with windows 7 OS(correct me if i am wrong), and also try with shared project structure,because portable has some problems with windows 7.
3. Yes currently there is no iOS emulator for Visual studio, if you want to run your app on ios simulator you have to connect your visual studio to Mac machine and then you can run.
Hope this will help
Answering your questions:
1- you might need to upgrade to windows 10. I have solved many issues when I upgraded to Windows 10. VS 2017 works very well with win10.
2- I would definitely recommend downloading the Visual Studio emulator which is a dedicated standalone application that has many emulators. It's much faster and reliable than android emulator. Also it has iPhone and windows emulator too.
3- in order to be able to use iPhone emulator, you must either do:
A) have a Mac device in the network to be able to connect VS with it. And it must have xcode installed on it.
B) you can also do a vmware virtual machine on any windows device and install on it xcode.
For detailed explanation on how tondo the above you can find them on YouTube.
Hope you have more luck.
When using Visual Studio 2015 to develop c++ for Android the emulator only works if you are running a Pro version of Windows, for those using Visual Studio Community who are probably also running on a Home version of windows (like me) the Emulator will not work.
Is there an alternative available that can integrate with the VS debugger?
*** Edit
I have been looking at this list Android emulators although this seems to be aimed at android gaming on PC rather than App development. So was wondering if anyone had managed to integrate one of these with Visual Studio?
Both the below options come with the caveat that I have not used either.
Xamarin Android Player
Apparently Xamarin had issues with the default Android Emulator. Primarily that it was slow, and clunky, and they were getting a lot of complaints about it from Xamarin users (despite it not being their product/fault).
They decided to create their own emulator to get around this, and it can be found here.
It should be noted that (at time of writing) this is still in Preview by the looks of things. So bugs may be present.
From what I can see on the download page, it doesn't appear like you need Xamarin to actually use it. In any case, it's worth a shot.
GenyMotion
Another option is GenyMotion. There is a free version for personal use only (with limited functionality), or a paid option that provides more capability.
Android player link has changed to here: https://developer.xamarin.com/releases/android/android-player/
I had problems starting the android VMs, even after restarting the host. There seems to be some incompatibilities between Windows 10 Home and Virtualbox 5.0.4 that Android player installs. Installing Virtuallbox 5.1.2 after installing Android player seems to have resolved this.
EDIT: I haven't had a chance to test integration with Visual Studio yet.
Everything seems to be working as expected within Visual Studio. Both of the VM devices I created in Android Player are visible in the drop down of the run menu. Visual Studio will start the selected VM when I debug the default blank android app.
The only hiccup is that Visual Studio doesn't wait long enough for the emulator to start before attempting to deploy the app. So I have to start the run again or remember to start the VM from Android Player before debugging.