Basic Android App not working on Xamarin Android Player via VS2015 - visual-studio

I have been trying to run basic Android App provided by Visual Studio 2015 via XAMARIN Android Player. Program gets build and deployed successfully, yet, App or anything does not appear on screen. Xamarin Player takes more than 20 mins to start and then nothing happens. Find Screenshots as well.

WIthin the Android SDK Manager look under Extras there is an package called Intel x86 Emulator Accelerator (HAXM Installer). Installing HAXM will increase the speed of the emulator when you use the Intel Atom CPU/ABI
Also when creating the emulator device check Use Host GPU for increaded performance.

I ran into few issues with Xamarin Android Player as well. Currently I am using Genymotion Emulator and it is much faster.

Well, Well, Well, I got my thing up and running. Following are the steps I performed:
After installing Xamarin for VS2015, I checked for latest Android SDK via SDK Manager. Got all the necessary updates installed.
Installed Xamarin Android Player and used emulator Nexus 5 KitKat API level 19.
Earlier I was using Nexus 5 Lollipop, was the reason why, it was not working. May be its not fixed for buil yet.
As, described by Mr.Pilatus in above answer, the particular HAXM things surely does help in accelerating emulator.
Got my Android app running.
Thank you all for all the necessary suggestion and guiding my in my baby steps in XAMARIN development. Gracias. NAMASTE!

Related

Why am I having trouble with the Android Emulator in VS Comm 2017?

I was having trouble using the Android emulator in Visual Studio Community 2017 and I decided to create a blank project to see if it will run. I get this error message when attempting to run it in the Live Xamarin Player:
Starting Android Emulator Android_Accelerated_x86_Nougat...
Failed to boot Android device emulator-5554...
Unable to deploy to Android_Accelerated_x86_Nougat, please ensure the Xamarin
Live Player app is open and the device is on the same network as Visual Studio.
Why would I have trouble running the emulator in a fresh blank project when I didn't even write a single line of code? Thanks for your help.
UPDATE: So I installed the latest Android SDK 8.0 along with they system image and tried to create a virtual device that uses it. But the Android Virtual Device Manager shows a, 'No system images installed' message when I selected the 8.0 framework. So I installed an earlier version of the SDK along with a system image (5) and was able to create a virtual device with it. So another question is why wouldn't the system images show up for the 8.0 framework?
The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll
(vv8.0) is greater than the $(TargetFrameworkVersion) for your project
(v7.1). You need to increase the $(TargetFrameworkVersion) for your
project
This means the Xamarin.Forms library is targeting Android 8.0 (API level 26) but your project is setup for Android 7.1 (API level 25). You can't change the Xamarin.Forms target version without downgrading, but you can change your project target version easily. You can learn more about these concepts from Xamarin. Be aware some of the details of that Xamarin blog post are already out of date!
There is another nice blog post from Xamarin which can walk you through the process of setting your system up for Android 8.0 API level 26. It's normally not this complicated, but Google changed their SDK tools internally between 25 and 26 in very major ways. They changed from GUI tools to command line tools.
You'll probably also want to get the (in preview) Xamarin Android Device Manager if you don't have a physical device to test with. This Xamarin Android Device Manager tool is the only way to create and configure API 26 and higher emulators without using the Google command line tools.
It seems as though Google has gotten rid of the GUI apps that manage the SDK and Virtual Devices in the latest version, so when you try to create a new virtual device with 8.0 it's not compatible with the GUI tools. Until Xamarin releases a GUI tool to replace them we can use the command-line to manage the SDK and virtual devices.
https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/sdk-cli-tooling-changes
https://developer.android.com/studio/command-line/avdmanager.html

Xamarin Android Emulator with Maps

I want to run local test of an app using the Android Emulator within Visual Studio 17. It works great using the Visual Studio Emulator for Android and the app is almost complete.
However I need to add a map with a few pins and I have this working and tested on my PC using the UWP app. However trying to run on the Android emulator there is no Maps as there is no play store.
I have googled lots and found lots of things to try but none seem to work and I notice that the latest of all the pages and blogs I have read are dated 2015 so in software terms and indeed Xamarin they are very old.
So if I want to test the maps part of my app what is the best way if I can't get the Emulator to run with maps or am I missing some fancy new tool to test with other than shipping the app and hoping that it works in the wild?
Thanks
Cliff.
You cannot see the map as Visual studio emulators for Android do not have google play services installed by default. In order to test and see your map, you should install google play services in the android emulator.
You can do this by installing gapps on your emulator which provides you with google play services functionallity. The installation is just a drag and drop in the emulator. After installing this packge, you could use maps on the emulator.
I would create a new Android VM in that process you can tell it to add the google store to the android VM

Xamarin Android Player stuck on acquiring IP

trying to launch XAP and it's just stuck loading, I checked the settings and it's stuck on 'Acquiring IP'. I've tried to repair it in Control panel& programs, same thing. It worked fine yesterday, I didn't change anything.
Using API 19, and Windows 7.
Any help is greatly appreciated.
Xamarin Android Player is discontinued, it is recommended to use Android simulators for Visual Studio or Google x86 emulators

xamarin studio android emulator starting take infinite time

I am using xamarin studio community edition on my macbook pro. when I try to run any sample project on android emulator it takes infinite time.
Can you please suggest. FYI It was working previosuly . Please check screen shot Android emulator error
I would highly suggest using the Xamarin Android Player instead of Google's default emulator manager.
The Xamarin Android Player is much faster and more reliable in my opinion although I have also heard that choosing different Google Play emulator images can make a big difference. Installing HAXM can also speed up the default Intel Google Play emulator images.
Download the Xamarin Android Player from here.
*Edit: Thanks to #SushiHangover for pointing out the fact that Xamarin deprecated the Xamarin Android Player. SushiHangover suggests using the Genymotion Android emulator which I have heard good things about but have not tried yet.

Strange windows phone app crashes only from the store

I am trying to update a 7.1 app from the store. For some reason it crashes only when installed from the store and only on 7.1 or 7.8 devices. My Lumia 920 with the latest updates works fine. The app runs fine if installed from VS 2010 or VS 2012. Of course all emulators worked fine. I put a Messagebox at Application_UnhandledException and it displayed this:
The type 'MyApp.MainPage', specified in the x:Class of
'/MainPage.xaml' could not be found in any loaded assembly.
Of course the MainPage class is there.
The app uses GPS and bing map and has capabilities:
ID_CAP_LOCATION
ID_CAP_NETWORKING
Can anyone shed some light on this?
I have just solved a similar problem where I had this error message when running from Visual Studio on my phone but not in an emulator. My problem was that I had different versions of the Microsoft.Live Assemblies in my 'main' app and the Assembly which contained the 'MainPage.xaml'.
I had a weird issue where my app worked differently from the store than on my device and the emulator. In my case it was because of trial mode. Apps run as though they are purchased when deployed to the emulator or device. It worked on my device from the store too, but that's because I bought it. Any other device which had not bought it ran in trial mode, and that's why it worked differently. I am betting that is why you are experiencing this crash. If it is not then we'll need more information.

Resources