Java Question unsupported class file version 53.0 ...while parsing module-info.class

moster67

Expert
Licensed User
I have a friend who is wrapping a library. It compiles fine with SLC, loads fine in B4A but when compiling in B4A, the following error appears:

B4X:
Convirtiendo byte code a dex optimizado.    Error
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.

warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
PARSE ERROR:
unsupported class file version 53.0
...while parsing module-info.class
1 error; aborting
I believe this is due to the fact that an included library (or perhaps others too) in his wrapper is/are using Java 8 features and that not all Java 8 features are supported on Android.

Don't know if it is related but in this thread, Erel mentioned that by adding a parameter to the dex tool, this might be fixed and that he would add a configurable option to resolve this problem.
I cannot find such an option or maybe I have missed something or maybe it is yet to be implemented?

Any ideas on how to resolve this problem?

Thanks.
 
Last edited:

moster67

Expert
Licensed User
Ok, thanks Erel. Will check this with my friend.
 

moster67

Expert
Licensed User
Just to check, I noted it compiled fine with B4J so I as you say, it is probably not compatible with Android.
Thanks.
 
Top