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

后端 未结 2 912
误落风尘
误落风尘 2021-01-12 14:27

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(

相关标签:
2条回答
  • 2021-01-12 15:01

    The problem seems in API installed. It is still a little mystery for me which APIs must be installed but deleting the build tools 24 and installing build tools 26.0.1 fixed the issue for build.

    Then installed NDK which was missing and set path in Xamarin options. Now 2 options are available for computers supporting HAXM and/or Hyper-V

    1. HAXM. Disable Hyper-V. Then change emulator setting in AVD manager which were not created and download an Itom image for emulator using Android SDK. Download and install HAXM. You are ready.
    2. Enable Hyper-V. Download and install Hyper-V VS emulators. Run it and create emulator(s) virtual machine(s). You are ready.

    Run your app.

    0 讨论(0)
  • 2021-01-12 15:25

    This happened to me when I included two files into "layout" folder: Tabbar.axml and Toolbar.axml. Following the Xamarin documentation at: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/android/appcompat-material-design

    I solved the problem just right clicking in those files, selecting Properties and changing the Build Action to AndroidResource.

    0 讨论(0)
提交回复
热议问题