I had the same problem when I switched frameworks, here is what I did:
I accessed the obj folder:
(for me it was: C:\Users\User\Documents\GitHub\GetToTheLander\proj.android\obj)
Then I deleted the “local” folder inside of the obj folder. This allowed for a clean build.
I hope this helps, I was stuck on this for a while