Phenomenon
When upgrading the gradle version to 7.4, an error similar to the following appears
* 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
solve
build.gradle
The method below the file complie
is outdated and needs to be changed to implementation
the method
before fixing:
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'
}
after modification
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'
}