'dependencies' cannot be applied to '(groovy.lang.Closure)'

前端 未结 15 2802
旧巷少年郎
旧巷少年郎 2020-11-30 01:28

I am unable to fix this error:

dependencies cannot be applied to \'(groovy.lang.Closure)

This is my gradle file:

buildscrip         


        
15条回答
  •  半阙折子戏
    2020-11-30 01:54

    My problem is that the whole build.setting file were occupied with cannot be applied to '(groovy.lang.Closure)' warning messages instead of happening on any particular variable.

    I have tried all solutions provided by others but none of them works for me. I ended out doing these steps then it works like a charm. If you are encountering the same issue then give it a try.

    1. Open and edit file: yourproject/gradle/wrapper/gradle-wrapper.properties. Edit content to update the gradle distribution version as shown in the image below then save.
    2. Delete this folder: yourproject/.gradle.
    3. Click Sync project with gradle files, then you are good to go.

提交回复
热议问题