Reputation: 24562
I created a new Xamarin.Forms solution by selecting: File > New Solutions > Forms App using .Net standard library.
As soon as I rebuild without making any code changes I see the following errors:
namespace test3.Droid
{
[Activity(Label = "test3", Icon = "@mipmap/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());
}
}
}
protected override void OnCreate(Bundle bundle)
Green line under bundle with this message: parameter name differs in base declaration
TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar;
Red line under Tabbar with this message: Ambiguity between Resource.Layout.Tabbar and Resource.Layout.Tabbar
Does anyone have any idea what's going on? Hoping for some advice.
Note if it's any help there appear to be two versions of Resource:
..test3.Android/Resources/Resource.designer.cs
..test3.Android/obj/debug/designtime/Resoure.designer.cs
as for the override being different I am not sure what is causing that problem
Thanks
Upvotes: 2
Views: 748
Reputation: 74124
parameter name differs in base declaration
The project template is just mismatched on the parameter name, it does not cause any compile/runtime issue, just a pain to see in the editor. You can change the name to savedInstanceState
match to make Intellisense happy.
Ambiguity between Resource.Layout.Tabbar and Resource.Lay.....
The ambiguity issue is a bug in how the generated file is applied to the Roslyn-based Intellisense system. Long-time known issue that has been fixed and re-broken multiple times across different releases. While is it is a pain to see the red Intellisense line, the project will compile/run fine...
Upvotes: 3