GithubHelp home page GithubHelp logo

Comments (6)

centic9 avatar centic9 commented on June 19, 2024 1

I have now excluded those files from the poi-shadow-all.jar to remove the warning.

from poi-on-android.

centic9 avatar centic9 commented on June 19, 2024

With "building APK", you mean the test-app that is included in this project, right?

Which version of JDK are you using?

Any local changes?

Do you have the system properties in place that are described at https://github.com/centic9/poi-on-android#necessary-system-properties.

And please provide the full output if there is more.

from poi-on-android.

Basheer009 avatar Basheer009 commented on June 19, 2024

Sorry for late reply, Building APK I mean creating a release, minifyEnabled true
and I have applied the proguard-rules.pro config as described in this repo

My JDK is 11.0.16
and Yes I have added the system properties like this:

System.setProperty("org.apache.poi.javax.xml.stream.XMLInputFactory", "com.fasterxml.aalto.stax.InputFactoryImpl"); System.setProperty("org.apache.poi.javax.xml.stream.XMLOutputFactory", "com.fasterxml.aalto.stax.OutputFactoryImpl"); System.setProperty("org.apache.poi.javax.xml.stream.XMLEventFactory", "com.fasterxml.aalto.stax.EventFactoryImpl");

in my App class which extends Application

Task :app:minifyReleaseWithR8
AGPBI: {"kind":"warning","text":"Unexpected reference to missing service class: META-INF/services/javax.xml.stream.XMLEventFactory.","sources":[{"file":"C:\AndroidProjects\CIDApp\app\build\intermediates\merged_java_res\release\base.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Unexpected reference to missing service class: META-INF/services/javax.xml.stream.XMLInputFactory.","sources":[{"file":"C:\AndroidProjects\CIDApp\app\build\intermediates\merged_java_res\release\base.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Unexpected reference to missing service class: META-INF/services/javax.xml.stream.XMLOutputFactory.","sources":[{"file":"C:\AndroidProjects\CIDApp\app\build\intermediates\merged_java_res\release\base.jar"}],"tool":"R8"}

from poi-on-android.

EliAgne avatar EliAgne commented on June 19, 2024

Could you provide the MainActivity or app java, build gradle and proguard files? It's difficult to determine the issue with the information given.

from poi-on-android.

Basheer009 avatar Basheer009 commented on June 19, 2024

in my proguard file:

`# for excel use

Apache POI

-dontwarn org.apache.**
-dontwarn org.openxmlformats.schemas.**
-dontwarn org.etsi.**
-dontwarn org.w3.**
-dontwarn com.microsoft.schemas.**
-dontwarn com.graphbuilder.**
-dontwarn javax.naming.**
-dontwarn java.lang.management.**
-dontwarn org.slf4j.impl.**
-dontwarn java.awt.**
-dontwarn net.sf.saxon.**
-dontwarn org.apache.batik.**
-dontwarn org.apache.logging.log4j.**

-dontnote org.apache.**
-dontnote org.openxmlformats.schemas.**
-dontnote org.etsi.**
-dontnote org.w3.**
-dontnote com.microsoft.schemas.**
-dontnote com.graphbuilder.**
-dontnote javax.naming.**
-dontnote java.lang.management.**
-dontnote org.slf4j.impl.**

-keeppackagenames org.apache.poi.ss.formula.function

-keep,allowoptimization,allowobfuscation class org.apache.logging.log4j.** { ; }
-keep,allowoptimization class org.apache.commons.compress.archivers.zip.
* { ; }
-keep,allowoptimization class org.apache.poi.schemas.
* { ; }
-keep,allowoptimization class org.apache.xmlbeans.
* { ; }
-keep,allowoptimization class org.openxmlformats.schemas.
* { ; }
-keep,allowoptimization class com.microsoft.schemas.
* { *; }
`

my app java file at onCreate

System.setProperty("org.apache.poi.javax.xml.stream.XMLInputFactory", "com.fasterxml.aalto.stax.InputFactoryImpl"); System.setProperty("org.apache.poi.javax.xml.stream.XMLOutputFactory", "com.fasterxml.aalto.stax.OutputFactoryImpl"); System.setProperty("org.apache.poi.javax.xml.stream.XMLEventFactory", "com.fasterxml.aalto.stax.EventFactoryImpl");

This what i get when building release app
Screenshot 2024-04-08 004342

from poi-on-android.

centic9 avatar centic9 commented on June 19, 2024

These are just warnings, right?

Is anything not working because of this or are you just curious about the warnings?

Android is missing some parts of normal JDK, this is why the setProperty()-calls are necessasry, the warnings might be remnants of this and may be hard to avoid here.

from poi-on-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.