There are two build.gradle files for a project with one module — one project level and another application level. It looks like you mixed up both.
Move the android block to the build.gradle file at the application level, and also remember to enable minSdkVersion and targetSdkVersion
source
share