Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/Questions/Error: could not find method compile() for arguments – quick tips
Next
Answered
Della O'Neill
  • 9
Della O'Neill
Asked: May 18, 20222022-05-18T21:21:41+00:00 2022-05-18T21:21:41+00:00In: java

Error: could not find method compile() for arguments – quick tips

  • 9

I get an error:

Could not find method compile() for arguments [[io.ibj:MattLib:1.1-SNAPSHOT], [email protected]] on root project 'project'

when I try to run the following code:

dependencies {
  compile group: 'org.bukkit', name: 'bukkit', version: '1.7.9-R0.1-SNAPSHOT'
  compile('io.ibj:MattLib:1.1-SNAPSHOT') {
  exclude group: 'de.bananaco'
  exclude 'net.milkbowl:vault:1.2.27'
  }
  compile group: 'net.citizensnpcs', name: 'citizens', version: '2.0.12'
  compile group: 'com.sk89q', name: 'worldedit', version: '5.6.1'
  compile group: 'com.sk89q', name: 'worldguard', version: '5.9'
  compile group: 'net.milkbowl', name: 'vault', version: '1.2.12'
  compile fileTree(dir: 'libs', includes: ['*.jar'])
 }
compile 'io.ibj:MattLib:1.1-SNAPSHOT'
dependencies {
  compile("org.gradle.test.excludes:api:1.0") {
  exclude module: 'shared'
  }
 }
Groovy: 1.8.6
 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
 Ivy: 2.2.0
 JVM: 1.8.0_05 (Oracle Corporation 25.5-b02)
 OS: Windows 7 6.1 amd64

How to fix the could not find method compile() for arguments. Please give me some good ideas.

could not find method compile
  • 2 2 Answers
  • 167 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-29T10:25:14+00:00Added an answer on June 29, 2022 at 10:25 am

    The cause:

    You got this error because there was a conflict in the version of Gradle, so the Gradle could not identify the execution configuration. The compile was the cause of this failure. The configurations of compile, testRuntime, testCompile and runtime which the Java plugin recommended had not been used since Gradle 4.10, and finally were excluded in Gradle 7.0. Therefore, this error happened.

    Solution:

    Because of the fact that ModuleDependency.exclude(java.util.Map) method is being used, it must be exclude the module: 'net.milkbowl:vault:1.2.27'(supplement module:), as described in document for DependencyHandler  which is linked from here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Liam Raymond
    2022-05-26T03:55:30+00:00Added an answer on May 26, 2022 at 3:55 am

    The compile, runtime and testCompile configurations introduced by Java plugin have been removed in Grade 7.0 ( Apr 9 2021).

    These configurations should be replaced with implementation, runtimeOnly, testImplementation and testRuntimeOnly.

    • 18
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.