I’m trying to use Smack 4.4.0-alpha1 but this applies to older versions too.
When compiling using Java 11 (and I guess from 9 and later) I get this compilation error
Error:java: the unnamed module reads package javax.xml.namespace from both java.xml and xpp3
This is because the xpp3 JAR includes the javax.xml.namespace.QName class. Something that has been a problem since java 1.5 which included that class in the JDK. Mostly it’s been passing under the radar since the classloader has just picked one of them but with a module path this is stricter.
I am not sure that this is the offical home of XPP3.
I think it’s the closest you can get, Aleksander Slominski is the original author of XPP and worked together with, among others, Stefan Haustein (the kxml author) on JSR 173 - StAX (completed around 2004)
I’m not sure how easy it is to make a single Smack jar that’s compatible with both Java 9+ and Android. I’m not an Android developer but as I understand it Google didn’t include the StAX API on Android since they decided to use XmlPullParser instead. I’ve heard that historically there have been issues including the StAX API on Android (Problems with stax-api dependency on Android · Issue #142 · FasterXML/jackson-dataformat-xml · GitHub) but maybe that’s history these days. I certainly hope so.