[英]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.