Xamarin 'Resource.Layout' does not contain a definition for 'Tabbar' error

Viewed 15468

I've created a basic xamarin.forms project (with PCL code sharing strategy) and I'm getting error for the following two lines in MainActivity::OnCreate()

TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

CS0117 'Resource.Layout' does not contain a definition for 'Tabbar'
CS0117 'Resource.Layout' does not contain a definition for 'Toolbar'

The resource files exist as Resources\layout\Tabbar.axml and Resources\layout\Toolbar.axml and the build action for both of them is set to AndroidResource.

I suspect there is something wrong with my android SDK installation. Currently the following packages are installed:

enter image description here

But the Run button in Visual Studio 2015 still is showing Android 6.0 API 23 and it's not possible to change it:

enter image description here

I've also set the Target Framework version of the Android project to 7.1:

enter image description here

The project structure is as the following:

enter image description here

I've followed this tutorial step by step to create the sample project.

How can I get the error fixed?

2 Answers
Related