could not find method compile() for arguments

后端 未结 2 1656
独厮守ぢ
独厮守ぢ 2020-12-09 10:14

I\'m trying to execute some .sql scripts and then deploy web app using gradle tomcat plugin.

But when I make any attempt to run gradl

相关标签:
2条回答
  • 2020-12-09 10:43

    I get this error sometimes after Android Studio does some operation that tries to automatically add things to my build.gradle file, and then it messes up lines of code in the dependencies block that end with quotes or double-quotes. So I end up with a line like this:

    def gpsVersion = '9.4.0'
    compile "com.google.android.gms:play-services-wearable:${gpsVersion}" compile "com.google.android.gms:play-services-places:${gpsVersion}"
    

    And as you can see it looks like the method compile has many arguments now. Fix the line spacing and resync to fix it.

    0 讨论(0)
  • 2020-12-09 11:03

    The build script is mixing up buildscript dependencies (i.e.

    1. dependencies of the build itself; typically this means Gradle plugins
    2. with regular dependencies (i.e. dependencies of the code to be compiled/run).

    2 needs to go into dependencies { ... }, not into buildscript { dependencies { ... } }.

    Everything but the classpath dependencies are regular dependencies.

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