1
我有一个实际调用片段的活动,以在recyclerView中显示其内容。问题是,在某些活动中,当屏幕旋转改变时,它再次调用OnCreate,这实际上是正确的。但是我不知道为什么base.OnCreate(savedInstanceState);标题说话给了我错误。在其他具有相同功能的活动中,它进展顺利。 3/6活动在屏幕旋转中未能响应。有关它的任何知识?System.NotSupportedException:无法找到默认构造函数。请提供缺少的构造函数(xamarin C#)
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState); // error occurred here
SetContentView(Resource.Layout.mylayout);
//rest of codes
}
//rest of the codes are removed due to error is only on this part