Execution failed for task ‘:app:javaPreCompileDebug‘.
·
debug运行app到模拟器的时候,一直报错,然后百度了下,给出的答案是:
android {
defaultConfig {
//添加如下配置就OK了
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}
但是加了之后,依然还是报错,说明我不是这个问题,最后在【Terminal】处看见了报错关键信息:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2m 19s
然后我猜想,是不是Gradle出现了问题。于是我决定刷新一下Gradle。使用命令:
在【Terminal】处,输入【gradlew build --refresh-dependencies】。然后等待一会,跑完之后,再运行app,就运行成功了。。。坑爹啊
更多推荐

所有评论(0)