I was trying to add a dependency to my application and I accidentally modified the wrong build.gradle file and now my application no longer builds correctly.
Not mentioned here, so maybe it can help some people.
Got this error and solved it by doing a gradle sync (somehow, android studio was not suggesting it).