I\'m getting this warning in my project gradle file:
Warning:(16, 5) \'buildTypes\' cannot be applied to \'(groovy.lang.Closure< com.android.build.
The problem presents when you import a project into your environment and the Gradle plugin is installed in a different location than what it was in the original. You just need to point out where your Gradle installation is.
Moving buildTypes or defaultConfig or whatever between each other is not a complete solution