buildTypes cannot be applied to groovy.lang.Closure

前端 未结 19 2160
故里飘歌
故里飘歌 2020-11-27 11:31

I\'m getting this warning in my project gradle file:

Warning:(16, 5) \'buildTypes\' cannot be applied to \'(groovy.lang.Closure< com.android.build.

19条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 12:10

    To solve this issue, in your Android Studio go to File -> Settings. In settings choose Build, Execution, Deployment -> Build Tools -> Gradle and select "Use default gradle wrapper (recommended)" option.

    After rebuild your build.gradle will be totally fine.

提交回复
热议问题