【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 裏已經告訴我們具體出錯的位置了
在這裏插入圖片描述

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