Visual studio will not start up the Android emulator on generated starter program test. I think I have every library and dependency I would need in order to test the program in an emulated environment, and the emulator itself works just fine, except for it taking it a long time to start up.
To preface, I am new with Xamarin. I have done some minor exploration, and development in android studio, which I had on another system. I moved to Xamarin for the multi-platform support.
I am running Visual Studio Enterprise 2017. With it I have installed Xamarin for mobile development with .NET, along with the Android SDK setup with API level 27 for both Oreo8.1, and Pie ONLY, both Intel x86 Atom_64 System Image and non 64bit images, Google APIs Intel x86 Atom System Image both 64 and non 64 bit, and Google Play Intel x86 Atom System Image both 64 bit and not, Google Android Emulator with API level 27, Intel HAXM, and universal windows platform tools for Xamarin.
I also have the Android NDK installed, but only with R15C.
The problem: I have a program that is a simple hello world program that is automatically generated in every xamarin.forms application in Visual Studio upon creation. I have not touched this code at all. I just want to run this program, so I can test that my emulator as well as my C# compiler, and everything else I need for development with this tool is working as needed before I begin developing anything on this platform. I have the Android device manager set up with a single Pixel Oreo 8.1 emulation. I have updated all the NuGet packages for the solution.
Every time I click the start button on my toolbar, I get a window stating there were deployment issues, and when I continue with its execution I get a pop-up error that says simply "object reference not set to an instance of an object." followed by warnings with the following:
Severity Code Description Project File Line Suppression State
Warning Failed to read 'C:\Users\<redacted>\source\repos\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug\81\android\assets\Xamarin.Forms.Platform.Android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. HelloWorld.Android
Warning One or more errors occurred. HelloWorld.Android
Severity Code Description Project File Line Suppression State
Warning Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly
at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(Disposable`1 stream, String fileName, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.ReadAssembly(String file) HelloWorld.Android
The research I found regarding this specific error is as follows:
What does “Object reference not set to an instance of an object” mean? What does "Object reference not set to an instance of an object" mean? (Does not apply because I have changed exactly no code at all.)
Object reference not set to an instance of an object When I create a new Android App (Visual Studio) Object refrence not set to an instance of an object When I create new Android App (Visual Studio) I applied the answer found in this question, but I am running an even newer version of the Android SDK than the one specified in that question, nine Android versions to be exact! I have updated everything in the two android OS that I am using here, and the only android SDK platforms offered on both respective versions is platform 27 and 28 for Oreo and Pie respectively, but I am still getting the error.
The only thing I can think of that would cause this issue is I am missing some sort of dependency or library that I needed in order to run Intel HAXM, which I also have, and has run with no problems on this machine. I can start up the pixel emulation just fine despite it taking an eternity to initialize it takes me to a simulated Android device.
Am I trying to run this from the wrong place? Did I install something wrong? Do I need to point the program somewhere? What am I doing wrong?
It is supposed to open a single activity on the device that has a single label text that says "Welcome to Xamarin.Forms! Hello World." centered on the screen.