I am building an Android App in Visual Studio. When I try to build the app referencing items in the Resources folder, I get one of two errors.
If I preface "Resource.Layout.[Id]" or "Resource.Id.[Id]" with the namespace for my project, I get this error:
The type or namespace name 'Resource' does not exist in the namespace '[app namespace]' (are you missing an assembly reference?)
If I don't preface the call to Resource with my namespace, it tries to access the default Android.Resource class and I get this error:
'Android.Resource.Layout' does not contain a definition for '[axml file]'
Has anyone run across this error before? I've been searching for a while and cannot come up with anything that seems to be wrong. The Resource.Designer file exists. I've deleted it and let it get regenerated. The Ids are in the Resource file, the project just doesn't recognize that the resource class is there at all.
Originally, the namespace for this application ended in "Android". Thinking that may be part of the issue, I've changed it to "_Android" and "AndroidApp", including changing the default namespace in the project properties and changing the namespace declaration in each file. However, this error persists through each change.