Android Emulator not running - xamarin.android

I am new to mobile development. Trying to follow tutorialspoint for my first xamarin android app. The emulator fails to start.
Emulator is set to use android 9.0. When running directly from Tools -> Android -> Android Device Manager, emulator runs but crashes. When running from Visual Studio debug, comes up with following error.
"Starting emulator testdevice ...
Checking HAXM compatibility.
Emulator testdevice cannot be started.
Runtime checks completed
NuGet package restore canceled."
where 'testdevice' is the name of my emulator.
Have been on Tools -> Android -> SDK Manager, then on Tools tab. Then Under Extras, I've selected the HAXM installer and clicked apply changes.
I've been looking online but nothing seems to help.

You might want to verify haxm support. On a command prompt type
sc query intelhaxm
For more info, refer to
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows

Related

Getting an error when running xamarin project?

I am new in xamarin, create a sample application using xamarin android native, when try to run get an error
C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -partition-size 512 -no-boot-anim -avd Android_Accelerated_x86_Oreo -prop monodroid.avdname=Android_Accelerated_x86_Oreo
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
Emulator Android_Accelerated_x86_Oreo cannot be started.
Runtime checks completed
Build has been canceled.
In Visual Studio go to Tools -> Android -> Android SDK Manager
Then make sure Android 8.0 / 8.1 (whichever one you're targeting) is installed.
Next in Visual Studio go to Tools -> Options -> Xamarin -> Android Settings
Then make sure you have the appropriate paths specified in Java Development Kid Location and Android SDK Location (should see little green checkmarks).
Also check the box to "Auto Install Android SDKs".
If something is screwed up still, would recommend going to Visual Studio Updater, then confirming Xamarin workload is installed or try to repair.

Can ios simulator can be run in Windows

I m working on appium scripting for mobile application automation testing.
I m able to simulate android device using the emulator and run the script in the emulator.
Now my next task is to run in ios. Please let me know it is possible to do it in ios emulator in Windows machine. If so some headsup on it.
You can not. There are platforms like React Native, Flutter, Xamarin, etc which enables you develop iOS applications; but when it comes to debugging and deployment, you have to have a macOS, which in turn requires a Macintosh machine.
Yess you can use Remote simulator to windows by enabling it under
Tools >> Option >> Xamarin >> IOS setting >> Remote simulator to windows.
But you still need active mac agent connection to build your app
You can use Appium studio free community edition for testing iOS physical device from windows machine.
note:- I have tested appium studio personally and think it will be useful for others.

Cannot launch app to Microsoft Emulator

I've just installed VS2017 with Xamarin, including MS Emulator. When I create a new blank Android project I can see the drop down with about 6 emulators in it. The majority start with 'Visual Studio'. I assume they are the Microsoft Emulator? When I try to run I can see in the output it's going to the Google emulator and then it complains about turning Hyper-V off. I'm lost as to why it's not running the MS emulator. Any ideas?

how to simulate ios app in windows using xamarin visual studio 2015

I am trying to simulate an iOS app on my windows machine using visual studio 2015(Xamarin installed). My windows machine is connected to a mac agent. When I simulate the app in the windows machine the simulator opens in the mac. Can any one tell me how to simulate the app on my windows machine.
You can use the iOS remote simulator. To use this feature you must update Xamarin and turn on remote simulator in Tools->Options->Xamarin->iOS.
You still need a mac for this feature.
You can use VNC to remote into the mac to show the simulator. That is what Xamarin dev's do at Evolve.
Unfortunately, that is your only option at the moment.
To simulate the iOS application, you must need MAC machine. Using Windows machine with Xamarin Studio, you can develop iOS application. But to run it on device or simulator, you need Mac machine.
Look at these solutions to remotely see the mac window:
Apple Remote Desktop
TeamViewer !
Chrome Remote Desktop
VNC Client. Activate screen sharing:
To fix this problem please follow these steps assuming your windows machine is connected to a mac agent:
Download and install the "Remoted iOS Simulator (for Windows)":
https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/
Go to Tools -> Options -> Xamarin -> iOS Settings:
Tick the checkbox "Remote Simulator to Windows"
Click in Build -> Configuration Manager:
Find your iOS project in the list and make sure the Platform is "iPhoneSimulator"
In your solution explorer right click in your iOS project and go to "Properties":
In the tab "iOS Build" find the section "Linker Options" and select the Linker behavior to "Link all assemblies" and Save
In your solution explorer right click in your iOS project again and click "Clean" and after that click "Rebuild"
Set the Visual Studio to run in Debug Mode and select "iPhone 5s iOS 9.3" click in option to launch the iPhone Simulator.
I hope it helps.
Remote iOS simulator is only available on enterprise
https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/
Remoted iOS Simulator requires a Visual Studio Enterprise license

Visual Studio 2015 hangs on deploying cordova application

I'm trying to build a blank cordova application into my iPad Air 2 with Visual Studio 2015 Enterprise edition as i've already done it with success with the release candidate version.
I've got node.js v 4.2.2 on both machines since version 5.2.0 was hanging the build indefinitely, i've also got latest version of iTunes (12.3.1) as well as iOS 9.2 on the mobile device.
I've got the remote MAC set up and everything works fine for the building part, infact i've checked and the .ipa file is there at the end of the build into the folder ...\Documents\Visual Studio 2015\Projects\BlankCordovaApp1\BlankCordovaApp1\bin\iOS\Debug and if i launch that it will correctly install into iTunes and the iPad itself.
The problem is that the build action with Configuration "iOS" and "Local Device" with the iPad connected to the windows 7 PC will hang indefinitely after copying back said .ipa file after writing this line into the Build Output:
2>------ Deploy started: Project: BlankCordovaApp1, Configuration: Debug iOS ------
No matter how much time i wait it wont start the debug session even if i authorized the pc onto the iPad and have my web Inspector turned on onto the safari options. At this point i have to interrupt the build to be able to work again.
What really gets me is that if i connect the iPad to the MAC machine and build with "Remote Device" option the build works fine and i can debug remotely from my windows pc, unfortunately working like that isn't an option since the Apple machine isn't in the same room of my developing machine.
Any insight about this issue would be really appreciate, thanks in advance.
You are using a recent version of node and thus will also need to use a recent version of Cordova.
Specifically, you need to use Cordova 5.3.3 to be able to use Node.js 4.x.x+. The hang you are experiencing is exactly why. It's an incompatibility with a down stream node module and Node 4.x.x. You can downgrade to Node 0.12.x or upgrade your Cordova project to 5.3.3.
http://cordova.apache.org/news/2015/09/22/tools-release.html
Note that Node 5.x.x is only supported in Cordova 5.4.1.
This should be addressed in the latest VS Tools for Cordova Update 6. Deploying to local device is now available.
Take a look at http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html.

Resources