Execution failed for task ‘:app:javaPreCompileDebug‘.
生活随笔
收集整理的這篇文章主要介紹了
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,就運行成功了。。。坑爹啊
總結
以上是生活随笔為你收集整理的Execution failed for task ‘:app:javaPreCompileDebug‘.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Unity-地形编辑器-编辑器拓展功能类
- 下一篇: Hadoop生态圈(二十一)- MapR