Visual Studio 2015 - Xamarin - Android - Getting “resource.id does not contain a definition for xxx” when I try to do anything in the .cs file

前端 未结 17 1477
后悔当初
后悔当初 2020-12-30 07:21

Adding Additional Activity .cs and Layout axml Using Visual Studio 2015.

I\'m very new to Xamarin and Android

相关标签:
17条回答
  • 2020-12-30 07:47

    My problem was I was trying to debug Xamarin Android project (native) using Xamarin Live Player, connecting using USB cable and selecting my device for debugging solved the problem

    0 讨论(0)
  • 2020-12-30 07:50

    Cleared Main.axml page and Reset and it is working.

    0 讨论(0)
  • 2020-12-30 07:51

    Just add namespace like that Android.Resource.Id - it's resolve for me

    0 讨论(0)
  • 2020-12-30 07:52

    For anyone else looking for an answer despite running clean/build/rebuild which didn't work for me:

    I had freshly installed a number of tools for xamarin development in VS. Though a build/rebuild may have actually worked, in my case I believe what also fixed it was closing and re-opening VS. I'm pretty sure I had a few issues, primarily stemming from newly installed tools (android SDKs in my case) requiring VS to be restarted. If you're working on a project already having installed the tools you need, try as others have said - build/rebuild.

    0 讨论(0)
  • 2020-12-30 07:58

    Make sure your axml is well formed and rebuild the solution it should work, if you continue facing the same issue then remove axml and add it again then build the solution.

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