項目更新代碼後無法運行,會報如下錯誤:
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.ThreadPoolExecutorManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
clean,rebuild 都試過,找了半天沒找到問題在哪。
後來才發現,注意一下報錯的第一行有一句:
see the compiler error output for details. 查看編譯器的錯誤輸出詳情
原來 build - Java Compiler 裏已經告訴我們具體出錯的位置了