【Android】org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed

项目更新代码后无法运行,会报如下错误:

org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:92)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:617)atorg.gradle.internal.concurrent.ThreadFactoryImplWorker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImplManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)

在这里插入图片描述
clean,rebuild 都试过,找了半天没找到问题在哪。
后来才发现,注意一下报错的第一行有一句:
see the compiler error output for details. 查看编译器的错误输出详情

原来 build - Java Compiler 里已经告诉我们具体出错的位置了
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章