Preface
Our village flower Dajun, although he went home for the Mid-Autumn Festival, he still likes to explore technology with me as always. Today Dajun started to learn to use gradle; as a result, I used gradle to build a Spring project, and just introduced the Spring-Context package. Error-Could not find method complie() for arguments;
Could not find method complie() for arguments
I wonder if Dajun is using Gradle for the first time, and if there is a problem with the steps in the process of using it, I first use gradle to build a Spring project by myself;
1. Download
2. Configure environment variables
This is the preliminary preparation;
When I created a new project, there was already a dependency in build.gradle:
testCompile group: 'junit', name: 'junit', version: '4.12'
I wrote the related dependencies of spring-context directly before this line;
compile group: 'org.springframework' , name: 'spring-context', version: '5.1.6.RELEASE'
testCompile group: 'junit', name: 'junit', version: '4.12'
Then when the build operation was executed, the build failed: Could not find method complie() for arguments
result
When I searched for this problem on the Internet, it was generally said that when the dependency was introduced, each complie had to be branched , I then deleted both lines of complie
, and then re-entered it line by line, and then compiled it. All right…
Gradle is also a tool analogous to maven; but maven uses the xml format, and the xml method is more cumbersome; gradle uses a format similar to the yaml file, which is simpler than the monthly xml format.
Then I told Dajun and asked Dajun to enter it again; Dajun also ended the question.