现象
升级gradle版本到7.4时出现类似下面的报错
* What went wrong:
A problem occurred evaluating root project 'test-common-lib'.
> Cfind method compile() for arguments [directory 'libs'] on object of type org.gradle.api.int
解决
build.gradle
文件下面的complie
方法过时了需要改成implementation
方法
修改前:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
implementation 'com.tencent.bugly:crashreport:3.2.1'
}
修改后
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
implementation 'com.tencent.bugly:crashreport:3.2.1'
}