I tried building stable and dev builds of monogame myself and then finding the app crashes on Android versions 6 & 7 when it tries to load dlls.
I then tried using the dev builds from nuget and they are showing similar behaviour.
It appears to be fine on other versions of Android as do the stable nuget builds of monogame.
07-30 11:19:50.880 E/AndroidRuntime(23660): android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'MonoGame.OpenGL.GL' threw an exception. ---> System.DllNotFoundException: dl
07-30 11:19:50.880 E/AndroidRuntime(23660): at (wrapper managed-to-native) MonoGame.Utilities.FuncLoader.dlopen(string,int)
07-30 11:19:50.880 E/AndroidRuntime(23660): at MonoGame.Utilities.FuncLoader.LoadLibrary (System.String libname) [0x00000] in <1cdd20a6d5654884ade8e071ffccae4d>:0
I'm using the latest stable Xamarin and Visual Studio Mac versions.
Is it possible that the new version of Xamarin.Android is causing this?
It seems this has more or less been confirmed as a problem with the latest Xamarin.Android.
https://github.com/xamarin/xamarin-android/issues/3388
It's not a monogame bug but I guess you should be aware of it as I think it's present in the monogame dev nuget builds.
I'm able to reproduce this bug on a Nexus9 device running Android 7.1.
I have a Pixel3 which works fine though.
Is that a problem only with VS2019?
How about xamarin.Android that comes with VS2017? Does it still work or it's broken too?
It appears to be an issue with Xamarin.Android 9.4.0.51
So turns out https://github.com/xamarin/xamarin-android/issues/3311 was a bigger bug than I thought it was :/
I had the same issue.
What version of MonoGame does the bug occur on:
What operating system are you using:
What MonoGame platform are you using:
Devices
Found a workaround posted by @brendanzagaeski in https://github.com/xamarin/xamarin-android/issues/3388#issuecomment-523272489_ and solved the problem temporarily.
NOTE: Use "dl" instead, save the following xml as "MonoGame.Framework.dll.config"
<configuration>
<dllmap dll="dl" target="__Internal" />
</configuration>
Closing as the issue was on xamarin-android side and it is fixed.
Most helpful comment
It seems this has more or less been confirmed as a problem with the latest Xamarin.Android.
https://github.com/xamarin/xamarin-android/issues/3388
It's not a monogame bug but I guess you should be aware of it as I think it's present in the monogame dev nuget builds.