buildTypes cannot be applied to groovy.lang.Closure

前端 未结 19 2238
故里飘歌
故里飘歌 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:20

    The issue at hand is that your Android Studio settings that you probably imported at upgrade, was still pointing to gradle-2.4 or some other versions than Android Studio 1.5 expects.

    To solve this problem, you should open up Settings and go to Build, Execution, Deployment > Build Tools > Gradle and change your local gradle distribution's home path or select the default gradle wrapper.

    Apply and re-sync your project.

提交回复
热议问题