# Steps to reproduce
Build a Xamarin.Forms Android project via
%msbuildpath% %projectfilepath% /p:Configuration=Release /t:PackageForAndroid /p:AndroidSupportedAbis=armeabi
Visual Studio 2015 is used here so %msbuildpath% is usually C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe.
# Expected behavior
Build is successfull like in Xamarin.VisualStudio_126.96.36.1993 (double checked by reinstalling old version and then reinstalling new version (Xamarin.VisualStudio_188.8.131.525.msi) where it fails).
# Actual behavior
Build fails with error message:
[cc stderr] obj\Release\bundles\armeabi\temp.c:1:39: fatal error: mono/metadata/mono-config.h: No such file or direct
[cc stderr] #include <mono/metadata/mono-config.h>
[cc stderr] ^
[cc stderr] compilation terminated.
# Supplemental info (logs, images, videos)
# Test environment (full version information)
Can confirm that the issue exists. Used the same steps to reproduce as in description
This is related to commit tamarin-android/master/b6d2360
The problem came from the tamarin-android repo switching over to use the system mono mkbundle rather than compiling its own. The problem being that the mono-config.h files are not present. This has now been fixed in the commit above.
The new system allows us to pass an additional flag to tell mkbundle NOT to use the headers. however this does require a new version of mkbundle (see mono/master/59737b2a).
Currently the only work around is to disable bundling of assemblies into native code.
Building with deactivating bundling of assemblies into native code works. However the app crashes after a few seconds after showing the splash screen on the device. I don't know if this is connected.
> the app crashes after a few seconds after showing the splash screen on
> the device
For a quick cross-reference possibility, that top-level symptom sounds like it might be Bug 56787. You can check if the device log (`adb logcat`)  from when the app crashes matches the information on Bug 56787 to see if it's the same scenario you're hitting.
## Bookkeeping note
To help tidy up the autocorrect spelling change in Comment 2, tamarin-android/master/b6d2360 refers to:
Thanks for the info but it seems to be a linking error. Logcat produces:
E/AndroidRuntime( 2899): java.lang.UnsatisfiedLinkError: Couldn't load monodroid from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/myapk.apk"],nativeLibraryDirectories=[/data/app-lib/myapk, /system/lib]]]: findLibrary returned null
It even happens when I set linking to "None".
> Couldn't load monodroid from loader
As a preliminary troubleshooting and sanity-check for that issue, you can try manually uninstalling the app from the device, fully cleaning the project (perhaps also manually clearing the bin and obj folders to be extra thorough), and then rebuilding and redeploying the app.
Cleaning the bin/obj did really help, thanks.
As to the original issue reported here:
> [cc stderr] obj\Release\bundles\armeabi\temp.c:1:39: fatal error: mono/metadata/mono-config.h: No such file or direct
The BundleAssemblies project option should no longer result in a build error and again be working as expected in monodroid/d15-2/9dbc4c53.