App not working in release mode

CrosevenCroseven USMember ✭✭

Hi all, I need some help figuring out what the problem is.

I have a brand new installation of VS2017 fully updated

When I run my app in debug mode it works, when I run the app in release mode it would just hung at the splash screen, I tried to check the device log but I can only see IlligalStateException

I changed the Java Heap to 1G, but it did not solve the problem
I am upgraded to Xamarin.Forms 3.0 and I am compiling using Android 8.1, that did not solve the problem (also tried to lower the version)

I set the Linking to None, that only increased the app size and did not solve the problem

When I uncheck the "Bundle assemblies into native code" it then works but I have always been compiling my apps with this.
I checked the version of the NDK it is currently set to "C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r15c" Not sure if the version is incorrect that I am using since this is also a new laptop (my other laptop was stolen where everything compiled and worked perfectly)

It also seem that the Device Log is lagging and doesn't want to filter. Device Monitor seems to be crashing aswell.


  • DimChrisDimChris USMember ✭✭✭

    Can you post a picture? I cant really understand what hung at the splash screen means

  • CrosevenCroseven USMember ✭✭

    Basically I have a splashscreen in my android application that is just a picture,
    See the following link:
    I did it exactly like that except for the Task.Delay and I also added the Finnish method to the splash screen.

    I don't believe it is the splashscreen causing the issue, it has something to do with the NDK

  • DimChrisDimChris USMember ✭✭✭

    You cant do much with ndk. You just download ndk and you set the location from xamarin settings. Check if something is wrong with the image path you are setting.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited May 2018

    Possibly relevant Visual Studio Developer Community cross-reference

    The symptoms in that other report are a bit different (a crash rather than a hang), but if you are using Visual Studio 2017 version 15.7, then perhaps the same change in the mkbundle that adds a reference to mono_jit_set_aot_mode() is responsible for the hang you are seeing too. (mkbundle is the tool that performs the "Bundle assemblies into native code" step.)

  • JeroenBernsenJeroenBernsen NLUniversity ✭✭

    Exactly the same problem here: my release build also hangs in the splashscreen (just a logo when starting up).

    This week I upgraded my VS2017 to 15.7. Now I just build a new release version for our users and hangs in the startup screen. I always compiled with the option "Bundle assemblies into native code" and that always worked. Now it only works if I turn on this option.

    Please fix ASAP, not sure if it is related to the other post here above. I any more info is needed please let me know.

  • CorneliuSerediucCorneliuSerediuc USMember ✭✭
    edited May 2018

    Also, after my last upgrade, the app built in release mode hangs on Splash Screen on Android. I am using a Mac as a build machine.

    What is happening?

  • KornelisKornelis USMember ✭✭

    Same here. In Debug Mode everything is working fine, but when switching to Release Mode the App keeps hanging in the SplashScreen. I'm using VS 2017 15.7.2 with Xamarin and Xamarin.Android SDK

  • oguzhanorhaanoguzhanorhaan TRMember ✭✭

    I have same issue

Sign In or Register to comment.