Adding Additional Activity .cs and Layout axml Using Visual Studio 2015.
I\'m very new to Xamarin and Android
Check the Resource.Designer class file. There will be a class like public partial class Id
. There the integer IDs of the controls are written. Use them instead of Resource.Id
Check if you are missing these namespaces in your layout file -
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
(VS 2019) I did the previous solutions and nothing, I had the same problem and the solution for me was to remove '&' from the text of TextView, I was trying to Set the text to "text&text" even &&(I though it was like mnemonics as in WindowsForms) didn't work so I had to remove it and it fixed.
The best solution I have found is to build solution. Choose Build solution from Build menu (or Ctrl+Shift+B). This action will resolve the issue.
Like Maniacz said, in VS 2019 I just had to change the XML to axml extensión to the layout in layout folder under resources
What did work for me (Visual Studio 2017, opening an old Xamarin project):
Now the Resource will be visible (of course, if you defined it correctly).