androidmads / SQLite2XL

Library to Convert SQLite to Excel and Vice-Versa
MIT License
166 stars 58 forks source link

generate signed APK when minifyEnabled = true #29

Closed DuongPhan0201 closed 4 years ago

DuongPhan0201 commented 4 years ago

I try build release with progurad, minifyEnabled. Debug mode run everything fine. (Android API 29, java 8, JRE 1.8.0, Pixel 4)

java.lang.ExceptionInInitializerError
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:489)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:348)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:405)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:386)
    at com.ajts.androidmads.library.ExcelToSQLite.working(ExcelToSQLite.java:128)
    at com.ajts.androidmads.library.ExcelToSQLite.access$100(ExcelToSQLite.java:24)
    at com.ajts.androidmads.library.ExcelToSQLite$2.run(ExcelToSQLite.java:100)
    at java.lang.Thread.run(Thread.java:919)
 Caused by: org.apache.poi.util.RecordFormatException: Unable to determine record types
    at org.apache.poi.hssf.record.RecordFactory.recordsToMap(RecordFactory.java:446)
    at org.apache.poi.hssf.record.RecordFactory.<clinit>(RecordFactory.java:292)
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:489) 
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:348) 
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:405) 
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:386) 
    at com.ajts.androidmads.library.ExcelToSQLite.working(ExcelToSQLite.java:128) 
    at com.ajts.androidmads.library.ExcelToSQLite.access$100(ExcelToSQLite.java:24) 
    at com.ajts.androidmads.library.ExcelToSQLite$2.run(ExcelToSQLite.java:100) 
    at java.lang.Thread.run(Thread.java:919) 

Try using -dontwarn org.apache.poi.* -keep public class org.apache.poi.hssf. {;} -keep public class org.apache.poi.ss. {*;}

Still error. Please help.