New Project Won't Start: Stack walks are not supported on this platform.

FilipEkberg-1FilipEkberg-1 USMember ✭✭
edited April 18 in Xamarin.Android

I created a new Xamarin Forms project, for Android, and immediately when starting it I get: Stack walks are not supported on this platform.

Got the latest packages off nuget, still the same thing.

Any ideas?

Using Visual Studio for Mac Preview 6 (7.0 build 2740) on Mac OS

Posts

  • VictorHGarciaVictorHGarcia USUniversity ✭✭

    I'm having same issue. Did you solve it?

    Thanks in advance

  • FilipEkberg-1FilipEkberg-1 USMember ✭✭

    I swapped over to Xamarin Studio and that seems to work, for now.

  • ChrisRiesgoChrisRiesgo USInsider, University, Developer Group Leader ✭✭

    I noticed this too and logged it on bugzilla.

    https://bugzilla.xamarin.com/show_bug.cgi?id=55087

    Were you guys running Visual Studio for Mac (with Mono 5.x)?

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    Can you please try calling the 3 parameter init, Init(Context, Bundle, Assembly) where assembly is the assembly with all your resources (normally hte assembly you called Init from)?

  • VictorHGarciaVictorHGarcia USUniversity ✭✭
    edited April 27

    Hello @TheRealJasonSmith I'm trying to invoke the method using 3 parameters, however, by checking this documentation, I'm not sure how to get the Assembly that contains all resources. https://developer.xamarin.com/api/type/System.Reflection.Assembly/

    global::Xamarin.Forms.Forms.Init(this, bundle, AssemblyName);

    Assembly Name is coming from System.Reflection

    I'm sharing a screenshot of the demo app.

    Any suggestions?

    Regards,
    Victor

  • VictorHGarciaVictorHGarcia USUniversity ✭✭
    edited April 27

    Hello @TheRealJasonSmith

    Actually, by the help of my friend @JohnMiller I was able to get the Assembly, but even with that change I can say the the same error message is getting when running the app on the Android simulator.

    using System;
    
    using Android.App;
    using Android.Content;
    using Android.Content.PM;
    using Android.Runtime;
    using Android.Views;
    using Android.Widget;
    using Android.OS;
    using System.Reflection;
    
    namespace HelloAgain.Droid
    {
        [Activity(Label = "HelloAgain.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
        public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
        {
            protected override void OnCreate(Bundle bundle)
            {
                TabLayoutResource = Resource.Layout.Tabbar;
                ToolbarResource = Resource.Layout.Toolbar;
    
                base.OnCreate(bundle);
    
                Assembly assem = typeof(MainActivity).Assembly;
                global::Xamarin.Forms.Forms.Init(this, bundle, assem);
    
                LoadApplication(new App());
            }
        }
    }
    

    Any other idea that could help us?

    Thanks in advance

  • FilipEkberg-1FilipEkberg-1 USMember ✭✭

    @TheRealJasonSmith said:
    Can you please try calling the 3 parameter init, Init(Context, Bundle, Assembly) where assembly is the assembly with all your resources (normally hte assembly you called Init from)?

    I switched over to Mono 4.x.x instead of 5 and that seems to solve the problem as well.

  • GCrockenbergGCrockenberg USMember ✭✭

    @FilipEkberg-1 said:

    @TheRealJasonSmith said:
    Can you please try calling the 3 parameter init, Init(Context, Bundle, Assembly) where assembly is the assembly with all your resources (normally hte assembly you called Init from)?

    I switched over to Mono 4.x.x instead of 5 and that seems to solve the problem as well.

    Are you using Visual Studio on Windows? How were you able to coordinate that switch? Thanks

  • paradise_humanparadise_human USMember ✭✭

    @FilipEkberg-1 said:
    I created a new Xamarin Forms project, for Android, and immediately when starting it I get: Stack walks are not supported on this platform.

    Got the latest packages off nuget, still the same thing.

    Any ideas?

    Using Visual Studio for Mac Preview 6 (7.0 build 2740) on Mac OS

    I have same problem in Visual studio in Windows at x86_64 emulator

Sign In or Register to comment.