我得到了以下错误,在一个新的android项目上,有2个模块,只有5-6个新的类。
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find org.projectlombok:lombok:.
Required by:
project :app
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html我搞不清楚到底是怎么回事,两个build.gradle文件都包含龙目岛依赖项
dependencies {
...
compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'
}发布于 2021-07-11 10:45:03
如果在Android Studio上,您可能需要检查以下内容:
已启用批注处理的
Settings > Build, Execution, Deployment > Compiler > Annotation Processors.)build.gradle文件中。在我的示例中,我在应用程序build.gradle文件中发现了一个额外的implementation 'org.projectlombok:lombok:1.18.20'依赖项。mavenCentral()添加到存储库列表,如下所示:allprojects {
repositories {
google()
mavenCentral()
}
}在解决了这3个问题之后,lombok对我来说运行得很好。
发布于 2021-03-23 02:29:02
您可以尝试使用lombok-plugin来查看问题是否仍然存在,而不是自己通过依赖项集成lombok。
例如。
plugins {
id "io.freefair.lombok" version "5.3.0"
}有关该插件用法的更多信息,请参阅:https://plugins.gradle.org/plugin/io.freefair.lombok和https://docs.freefair.io/gradle-plugins/5.3.0/reference/
https://stackoverflow.com/questions/66675531
复制相似问题