简体   繁体   English

发生未处理的异常。 在Xamarin Visual Studio上

[英]An unhandled exception occured. on Xamarin Visual Studio

When starting my app I show the following error, and investigated about the error but I do not find answers in any forum xamarin, when I do the breakpoint this stops in the MainActivity.cs attached my code from now, thank you for you help 启动我的应用程序时,我显示以下错误,并调查了该错误,但在任何论坛xamarin中均未找到答案,当我执行断点时,此错误会在MainActivity.cs中停止,此后附上我的代码,谢谢您的帮助

using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

namespace SITMovil.Droid
{
    [Activity(Label = "SITMovil",
 Icon = "@drawable/icon",
 Theme = "@style/MainTheme",
 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);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
    }
}

Although It might not be helpful in given scenario but in my case when I was trying to load an icon that was not part of project, I got that exception. 尽管在给定的情况下可能没有帮助,但是在我尝试加载不属于项目的图标的情况下,出现了异常。 Make sure you are not using resources that are no longer exist in the project. 确保您不使用项目中不再存在的资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xamarin Visual Studio安装程序包未处理的异常 - Xamarin Visual Studio Install Package Unhandled Exception Visual Studio 2013-修复了未处理的异常 - Visual Studio 2013 - Fixing An Unhandled Exception has occured Xamarin IOS-启动期间发生“未处理的异常” - Xamarin IOS - 'An unhandled exception occured' during start Visual Studio Designer未处理的异常 - Visual Studio Designer unhandled exception Fody:发生了未处理的异常 - Fody: An Unhandled Exception Occured 尝试在Visual Studio 2017中显示xamarin.Forms.Maps时发生“未处理的异常” - “unhandled exception occurred” while trying to display xamarin.Forms.Maps in visual Studio 2017 发生PinvokeStackImbalance。 抛出此异常,但我不知道错误是什么? - PinvokeStackImbalance occured. This exception is thrown but i have no idea what the error is? 当我单击xamarin中的按钮时,xamarin.forms发生未处理的异常 - An unhandled exception occured xamarin.forms when i click a button in xamarin Visual Studio 在已处理的异常上中断,就好像它是未处理的一样 - Visual Studio breaks on Handled Exception as if it was Unhandled Fody:发生未处理的异常 - Fody: An unhandled exception has occured
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM