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

前端 未结 15 2787
旧巷少年郎
旧巷少年郎 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 02:19

    If you already are using the "default gradle wrapper" and it doesn't help:

    In Menu click: File -> Invalidate Caches / Restart...
    

    If it also doesn't help try in 2 steps:

    1) Delete ".gradle" folder (and "build" folder if you have it already)
    
    2) In Menu click: File -> Invalidate Caches / Restart...
    

    After restarting the warning should disappear.

    (For me it worked and for Android Studio and for IntelliJ Idea)

提交回复
热议问题