赞
踩
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.13.1'
}
原因是较新版的gradle将testCompile换成了testImplementation,因此换一下就好:
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
dependencies {
compile group: 'commons-io', name: 'commons-io', version: '2.6'
}
有人说报错原因是因为每一个compile声明之间应该用换行符隔开,可以先试试能不能解决问题。
在gradle官网输入关键字:
Gradle官网
会发现出现这类问题都是这种依赖配置写法在新版本中被移除了。
根据提示点进去会发现将compile关键字改一下就好:
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
}
遇到这类问题去官网查比在csdn查更容易解决问题。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。