Android Studio调用
Workbook workbook = new XSSFWorkbook();
时报错:ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
添加的依赖有:
// https://mvnrepository.com/artifact/org.apache.poi/poi
implementation group: 'org.apache.poi', name: 'poi', version: '5.2.4'
// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.2.4'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
annotationProcessor group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.21.1'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.21.1'
网上有很多解决这个问题的贴子,不过,都是IDEA的平台上,而不是在Android Studio上。还说要添加一个log4j2.xml。我也添加了,不过任然不管用。