Yes, exactly, "something" within the android closure is not correct. Unfortunately, the Groovy DSL is not more precise. Comment out "random" things to find out what is wrong.
I can also highly recommend the Kotlin DSL instead. By now it is the default DSL, immediately brings type-safe build scripts, actually helpful error messages if you mess up the syntax, and amazingly better IDE support if you use a good IDE like IJ or AS.