Building Monogame from source fails on Android 6 & 7

I downloaded the source from github (both release and develop branches) and compile with my project.

Everything works fine except apparently on devices running Android 6 or Android 7. It appears that it can’t load the openal lib. I’ve checked and libopenal32.so is in the apk.

The latest version of FuncLoader.Android.cs doesn’t seem to make any difference.

Again, everything works fine on all other versions of Android and it works fine all all devices with the nuget release package. (I need to compile from source as I need an unreleased patch).

Any clues?

07-30 08:41:57.126 E/AndroidRuntime(27045): android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'MonoGame.OpenAL.Alc' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MonoGame.OpenAL.AL' threw an exception. ---> System.DllNotFoundException: dl
07-30 08:41:57.126 E/AndroidRuntime(27045):   at (wrapper managed-to-native) MonoGame.Utilities.FuncLoader.dlopen(string,int)
07-30 08:41:57.126 E/AndroidRuntime(27045):   at MonoGame.Utilities.FuncLoader.LoadLibrary (System.String libname) [0x00000] in <ea08de10169740f4a6436b5e90a7d81b>:0 
07-30 08:41:57.126 E/AndroidRuntime(27045):   at MonoGame.OpenAL.AL.GetNativeLibrary () [0x00006] in <ea08de10169740f4a6436b5e90a7d81b>:0

Did you follow the build instructions carefully?

I’m currently using a custom build for the same reason but I don’t have this issue, so I feel like maybe you performed a step incorrectly?

git clone https://github.com/MonoGame/MonoGame.git
cd MonoGame/
git submodule update --init
mono Protobuild.exe --generate Android

and then reference the solution in my app.

I’m using the very latest stable Xamarin and Visual Studio Mac versions. Any chance an update in those could have broken it?

Hmm weird. I guess the only difference is your building it on a mac. I don’t actually remember even performing that last step.

When was the last time you built it?

It looks like the latest dev nuget build fails in the same way but I’m not 100% sure. It’s a bit of a pain to test as I don’t have access to a physical 6 or 7 device.

oh good point, would be approx 2 weeks back now.

Looks like I wasn’t imagining it.

May be best to hold off on upgrading to latest Xamarin.Android.