当前位置:网站首页>idea Gradle7.0+ :Could not find method compile()
idea Gradle7.0+ :Could not find method compile()
2022-07-16 09:27:00 【JAVA|Mr.Java】
Could not find method compile() for arguments Gradle
Bazer Con 提问原文:
Looked around for this solution for much too long now, and I'm not sure if I missed it or just misstyped something, but my Gradle script will not compile. I am migrating to Gradle, and am very new with it. I am very used to using Maven for dependency management, but Gradle seems best me for now. From running this snippet of code。
翻译如下:
寻找这个解决方案已经太久了,我不确定我是否错过了它,或者只是错误地输入了一些东西,但我的Gradle脚本无法编译。我正在迁移到Gradle,并且对它非常陌生。我非常习惯使用Maven进行依赖管理,但Gradle似乎是目前最适合我的。运行这段代码:
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'])
}报错:
Could not find method compile() for arguments [[io.ibj:MattLib:1.1-SNAPSHOT], [email protected]] on root project 'project'ashelkov 回答原文:
Note that the compile, runtime, testCompile, and testRuntime configurations introduced by the Java plugin have been deprecated since Gradle 4.10 (Aug 27, 2018), and were finally removed in Gradle 7.0 (Apr 9, 2021).
The aforementioned configurations should be replaced by implementation, runtimeOnly, testImplementation, and testRuntimeOnly, respectively.
翻译如下:
compile, runtime, testCompile, and testRuntime 等在Gradle 7.0以后移除了,我们需要用 implementation, runtimeOnly, testImplementation, and testRuntimeOnly 一替代。
例如:compile 改成 implementation.
边栏推荐
- 【初始C语言】/*字符函数和字符串函数模拟实现详解*/
- [untitled] pseudo class selector and box model
- [binary tree] all elements in two binary search trees
- C language under custom type (enumeration, Union)
- 7.13 learning records
- Tutorial on the principle and application of database system (021) -- database operation of MySQL
- #kubeadm安装Kubernetes 1.15最佳实践#
- C语言实训通讯录(静态和动态版本)
- C# 串口与TCP客户端 STTech.BytesIO
- Hcip ppp/hdlc, gre/mgre experiments
猜你喜欢

465 sword finger offer (53-i, 53-ii, 04, 50)
Talk about promise

Kubedm install kubernetes 1.15 best practices

Assist developers to comprehensively interpret APIs IX test cases

Fosai biology interprets the changes in the atmospheric environment in the first half of 2022, and VOCs control is still the key to breaking the situation

query string、formData和request payload的区别

Tutorial of database system principle and application (020) -- login MySQL

What are the key smart contracts in defi?

jitsi manu install(三)

CompressAI:基于pytorch的图像压缩框架使用
随机推荐
Sword finger offer 10- I. Fibonacci sequence (4 solutions)
What is the basic task of MRP
Elk cluster deployment (II) deployment kibana
[initial C language] / * detailed explanation of the simulation of character functions and string functions*/
Joint Autoregressive and Hierarchical Priors for Learned Image Compression文献复现
Compressai: image compression framework based on pytorch
Analysis of container health inspection
windows环境下升级mysql5.5.27到5.7.35
ValueError: The number of FixedLocator locations (7), usually from a call to set_ ticks, does not mat
PG运维篇--错误日志和慢日志
7.14二分,LCA,差分,思维构造
PG operation and maintenance -- error log and slow log
数据库系统原理与应用教程(020)—— 登录 MySQL
RSS上手教程:聚合自己的信息收集渠道,RSSHub、FreshRSS、NetNewsWire
【生物信息】蛋白质交互课题思路成长营(14天)
Hcip - ppp/hdlc and gre/mgre experiments
Which is the most suitable price system for the three cloud rendering platforms (I)
pmp证书有用么?
Kubedm install kubernetes 1.15 best practices
What are the key smart contracts in defi?
https://stackoverflow.com/questions/23796404/could-not-find-method-compile-for-arguments-gradle