This is my first time making an app with XML layouts. In the past I have always dynamically generated my layouts at runtime, so don\'t worry, I am NOT an Android newbie. S
I had this problem and for me just solved by selecting my projects "MainActivity" from dropdown menu "Associated activity or fragment providing context" in the graphical view of my layout.