I was having this problem on all versions of AS 3.0+. Syncing with gradle did not solve the problem for me. The solution from András KlöczlAndrás Klöczl was the only thing that would allow me to get some coding done. The problem was, anytime I had to do a gradle sync, the problem came back. So I had to go through that process any time I wanted to make a change in my build.gradle. What ended up working for me was to downgrade my kotlin version from 1.2.40 to 1.2.30