I got an Eclipse project source code(I was told that on Android Studio, maybe they just confused), and I start to migrating the code to android studio refers to
I tried several of the other answers here with no joy.
In the end I simply deleted the offending line and rewrote it directly into Android Studio. The error disappeared.
Android Studio
Was this caused by me copying and pasting the line of code from youtube (or whatever random blog I was looking at at the time)?