How can I configure Android Studio/IntelliJ Idea to show more than 101 error messages when compiling?
I know there are more than 101 errors, but I am using Android Annotations and I get a lot of import errors when something is wrong. Those import errors fill up the messages window and I can't see the actual errors that need to be fixed.
Thanks!
This 101 error limit is imposed by the underlying compiler , not the IDE. So to increase it, you have to change the default compiler settings.
Go To : Preferences
-> Build, Execution, Deployment
-> Compiler
.
There, you'll find an option of passing additional command line options to the compiler. There you can change the max errors limit.
The compiler used by Android studio is javac
and it offers the following options :
-Xmaxerrs number : Set the maximum number of errors to print.
-Xmaxwarns number : Set the maximum number of warnings to print. `
So, you can pass :
-Xmaxerrs 400 -Xmaxwarns 1000
to make the maximum errors reported to 400 and maximum warnings reported to 1000.
That's one way to do it in IDE UI and change it globally for all projects.
You can also set this for a specific project by passing these command line options to the compiler through the gradle
file of the project. Here's the syntax for that:
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "400" << " -Xmaxwarns" << "1000"
}
In Gradle, change the allprojects
of your Project build.gradle
as following:
allprojects {
repositories {
jcenter()
}
// Allow 400 errors.
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "400"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With