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:
But the Run
button in Visual Studio 2015 still is showing Android 6.0 API 23
and it's not possible to change it:
I've also set the Target Framework
version of the Android project to 7.1:
The project structure is as the following:
I've followed this tutorial step by step to create the sample project.
How can I get the error fixed?