buildTypes cannot be applied to groovy.lang.Closure

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

    I used to have this warning, after I updated Android Studio.

    When I went to Settings>>Build Tools>>Gradle I found Local Gradle path was invalid, since gradle version was updated as well from 2.6 to 2.8.

    Fixed the new path and re-sync gradle removed the warning.

    Another way is to use gradlewrapper.

    0 讨论(0)
提交回复
热议问题