通过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/