2017-10-20 111 views

回答

3

原來,javac最多會打印100個編譯錯誤,而在處理預處理程序時,通常需要最後一條錯誤消息,而不是第一條錯誤消息。把這個在頂層的build.gradle文件,並變得快樂:

allprojects { 
    gradle.projectsEvaluated { 
     tasks.withType(JavaCompile) { 
      options.compilerArgs << "-Xmaxerrs" << "4000" 
      options.compilerArgs << "-Xmaxwarns" << "4000" 
     } 
    } 
} 

感謝:https://movieos.org/2017/android-room-data-binding-compile-time-errors/