gradle版本:gradle-7.1
完整报错
Could not find method api() for arguments [[xxx:xxx:xxx], [yyy:yyy:yyy], [zzz:zzz:zzz]] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
解决方法:
List xxx = [
xxx:xxx:xxx
]
List yyy = [
yyy:yyy:yyy
]
List zzz = [
zzz:zzz:zzz
]
dependencies{
api xxx, yyy, zzz //这行会报错
compile xxx, yyy, zzz //这样就可以了
implementation xxx, yyy, zzz //这样就可以了
}