Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android issues #4

Open
Myrronth opened this issue Sep 1, 2021 · 0 comments
Open

Android issues #4

Myrronth opened this issue Sep 1, 2021 · 0 comments

Comments

@Myrronth
Copy link

Myrronth commented Sep 1, 2021

I’m not sure if this library is supposed to work on Android, but at least for me it is currently not working.

  1. I get a build error
Duplicate class javax.activation.ActivationDataFlavor found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.CommandInfo found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.CommandMap found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.CommandObject found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataContentHandler found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataContentHandlerFactory found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataHandler found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataHandler$1 found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataHandlerDataSource found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataSource found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.DataSourceDataContentHandler found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.FileDataSource found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.FileTypeMap found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.MailcapCommandMap found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.MimeType found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.MimeTypeParameterList found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.MimeTypeParseException found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.MimetypesFileTypeMap found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.ObjectDataContentHandler found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.SecuritySupport found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.SecuritySupport$1 found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.SecuritySupport$2 found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.SecuritySupport$3 found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.SecuritySupport$4 found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.SecuritySupport$5 found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.URLDataSource found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
Duplicate class javax.activation.UnsupportedDataTypeException found in modules jetified-activation-1.1 (javax.activation:activation:1.1) and jetified-javax.activation-api-1.2.0 (javax.activation:javax.activation-api:1.2.0)
  1. When I exclude the javax.activation package, the build succeeds and I can try to parse a TCX file.
implementation("pl.jakubtrzcinski:tcx-parser:1.0.2.RELEASE") {
    exclude(group = "javax.activation")
}

But when parsing via TcxParser().parseTCX(inputStream) I get the following exception:

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/Image;
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:385)
        at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:63)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:128)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:84)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:162)
        at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:92)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:455)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:303)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:139)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1156)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:165)
        at java.lang.reflect.Method.invoke(Native Method)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:297)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:286)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:409)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
        at pl.jakubtrzcinski.tcxparser.TcxParser.<init>(TcxParser.java:24)

I know that some java/awt* packages are not available on Android, which leads me to the assumption that this library is not designed to work on Android? Sadly, I could not find any other library to read and write TCX :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant