本文介绍了Gradle构建完成了200个错误 - 在android studio中更改限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主要问题

主要问题仍未解答:是否有方法可以更改打印到控制台在android studio?



旧内容



m使用代码生成库。因此,单个错误可能会突然导致数百个导致此单一错误的错误。



目前,我遇到了无法找到错误的问题,因为我得到200错误错误:无法找到符号类... ...



如何更改限制200到更大的数字?



编辑

没有代码,因为它是一个Android工作室问题

EDIT2

我知道,如果我打开一个XML文件并插入一些无效的代码(意外)。它只是偶然发生......问题是,android studio会停止将错误写入错误输出控制台,然后才能看到实际的错误源...



我的问题的解决方案



在我的特例中,我向类添加了一个字段并将其声明为private。这导致了问题,代码生成器parcelable失败。它打印出一个错误,但由于200错误的限制而无法看到...

解决方案

将此添加到您的Build.gradle

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


MAIN QUESTION

The main question is still unanswered: Is there a way to change the limit that is printed to the console in android studio?

OLD CONTENT

I'm using code generation libraries. So a single error can suddenly lead to hundreds of errors resulting in this single error.

Currently I've the problem that I can't find the error, as I get 200 errors of error: cannot find symbol class ......

How can I change the limit of 200 to a bigger number?

EDIT

No code, as it is a android studio question

EDIT2

I know, it can happen if I open a xml file and insert some invalid code (by accident). It just happens by accident... The problem is, that android studio stops writing the errors to the error output console before the actual error source is visible...

SOLUTION FOR MY PROBLEM

In my special case I added a field to class and declared it as private. This lead to the problem, that the code generator for parcelable failed. It prints an error, but it can't be seen due to the 200 errors limit...

解决方案

Add this to your Build.gradle

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

这篇关于Gradle构建完成了200个错误 - 在android studio中更改限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 18:53