gradle - 抑制由Apache POI引起的Gradle警告

标签 gradle apache-poi

通过Gradle使用Apache POI库会导致以下警告:

Class org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun not found - continuing with a stub.



Google认为这并不是真正的问题:https://github.com/norbert-radyk/spoiwo/issues/22。但是,如何抑制此警告?

我的build.gradle包含
        'org.apache.poi:poi:3.11',
        'org.apache.poi:poi-examples:3.11',
        'org.apache.poi:poi-ooxml:3.11',
        'org.apache.poi:poi-ooxml-schemas:3.11'

注意我不想包括一个额外的库并不必要地膨胀文件大小。在编译时取消警告是可以的。

谢谢!

最佳答案

您可以通过CompileOptions.warnings停止此警告,例如:

apply plugin: 'java'

dependencies { ... }

compileJava {
    options.warnings = false
}

关于gradle - 抑制由Apache POI引起的Gradle警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48638862/

相关文章:

android - 当我设置 Custom buildTypes 时,我遇到了一些错误。谁能帮助我?

android - 在编译 Kotlin 代码之前从 gradle 运行 CMake

Android Gradle 分离变量

android - 新的 Android Gradle 构建系统构建配置包名称与 Provider Authority 冲突

gradle - java.lang.NullPointerException : Project directory not specified

Java POI 类NotFoundException

excel - POI : Unexpected record type org. apache.poi.hssf.record.HyperlinkRecord

java - POI SAX 日期数据类型

java - Apache poi : images in spreadsheet are associated with workbook and can not be retrieved/linked with individual worksheet . 。

java - 如何更改 XSSFCellStyle 中的字体大小?