Could not find method compile() 非换行原因

在新机器中导入了旧项目,发现gradle报错

Could not find method compile()

网上大部分都在说换行的事情,但是我现在的情况不是因为换行导致的。

查阅文档发现 compile,runtime,testCompile,testRuntime在gradle7.0版本中被删除。

上述的配置应分别改为implementation,runtimeOnly,testImplementation,和testRuntimeOnly。

implementation 'com.google.protobuf:protobuf-java:3.6.0'
testImplementation group: 'org.testng', name: 'testng', version: '7.1.0'

猜你喜欢

转载自blog.csdn.net/sinat_18538231/article/details/120113572