[SOLVED] Getting a MissingMethodException in MonoGame Android

The same thing that happens when I click break; it pretty much stops debugging and goes back to coding.

I am hitting a guess that this is .NET’s Reflection… are you using a web protocol?

Although I’m not sure what a web protocol is, (I’m not that much of a web developer) I don’t think that I’m using one. Unless NetworkComms counts as a web protocol –and I doubt it, as I’m merely using it to send packets over LAN–

What VS edition are you using?

Visual Studio 2015 Community

That is odd… and it does not give you any suggestions of a NUGET? usually if it suggests a using statement for you it also gives you an automatic using fix that uses NUGET to correct the using issue… I get this the majority of the time…

Nothing for you like that?

I pointed out Reflection as this is a .NET thing, I assume you just need to add the using for Reflection in the .NET library and this may fix the issue… what commands are you commenting out? if you can post that code, we may be able to isolate what you need to do to fix it.

Isn’t NUGET basically the packet manager? (That reminds me, I’ve got to try to update monogame and xamarin)
Anyway, nope. Those exceptions and errors only show up during runtime — while debugging. It could be that I’m missing a reference, but the chance of that being the case is very low.

I can’t use my laptop now as I’m going to sleep soon but I’ll post the code ASAP!

Oh and, this only happens when I use the NetworkComms DLL in an Android monogame project, whereas it works fine in a Windows project.

I am assuming this is while deploying during debugging mode, does it happen In release?

[I should probably mention I do not develop for Android]

Last time I tried changing the build from debug to release, the same problem occurred.
This problem seems to be strictly related to Android so we might need an Android dev here too.

Ah Right you are using MonoGame NetworkComms, it slipped past me there… yeah I suppose I would be of no help but I may learn something here… good luck. :sake:

Oh and welcome to the forums :slight_smile:

Thanks!
And, MonoGame NetworkComms? NetworkComms is basically a library that assists you with sending TCP/UDP packets.
I could wait for someone else (as I mentioned earlier, I’m going to sleep anyway), but you could possibly know something about it too.
Anyway, I’ll be posting the code fairly soon, and I don’t think that anyone would be able to help me with the problem without the code.

My assumption was this NetworkComms may not support Android?

Ohhh. Sorry, I misunderstood.
I guess so, even though that would be sort of weird.

I uploaded the code. I hope it can be of use for anyone who might know how to solve this problem.

Is Proguard enabled?
I had a similar problem with MissingMethodException.

I’m not sure what proguard is either. I’ve looked pretty much everywhere in my project and I don’t see anything with that name.
I’m using Visual Studio. Maybe it’s a Xamarin thing?

It’s in the Project Properties, but forget about it, it’s available only under Release and you said you debugged the program.

So, you use the DLL that’s compiled for android on the android project and the DLL that’s compiled for windows on the windows project, right?
You didn’t accidentally reference the same dll from both projects?

Oh shoot. I guess I used the same DLL for both projects. Hold on I gotta try swapping it.

Thanks! It works now. (Though it fails to send some packets but that doesn’t relate to monogame)
I’ll mark it as solved.