Note that there are some explanatory texts on larger screens.

plurals
  1. POSimpleXML on Android and error while deserialization
    primarykey
    data
    text
    <p>I'm trying to deserialize an object on an Android device using SimpleXML. In a maven file I used dependency with exclusions (I followed an advice in an another question, as without excluding these dependencies, I couldn't start the application):</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.simpleframework&lt;/groupId&gt; &lt;artifactId&gt;simple-xml&lt;/artifactId&gt; &lt;version&gt;2.6.7&lt;/version&gt; &lt;exclusions&gt; &lt;!-- StAX is not available on Android --&gt; &lt;exclusion&gt; &lt;artifactId&gt;stax&lt;/artifactId&gt; &lt;groupId&gt;stax&lt;/groupId&gt; &lt;/exclusion&gt; &lt;exclusion&gt; &lt;artifactId&gt;stax-api&lt;/artifactId&gt; &lt;groupId&gt;stax&lt;/groupId&gt; &lt;/exclusion&gt; &lt;!-- Provided by Android --&gt; &lt;exclusion&gt; &lt;artifactId&gt;xpp3&lt;/artifactId&gt; &lt;groupId&gt;xpp3&lt;/groupId&gt; &lt;/exclusion&gt; &lt;/exclusions&gt; </code></pre> <p>For testing I wrote just a simple class:</p> <pre><code>class Test { String s; } </code></pre> <p>and I try to get an object:</p> <pre><code>Test t = null; try { t = serializer.read(Test.class, source); } catch (Exception e) { e.printStackTrace(); } Log.v("t",t.s); </code></pre> <p>but in the last line, while I try to read the field t.s, I'm getting errors like:</p> <pre><code>Could not find method javax.xml.stream.XMLInputFactory.newInstance, referenced from method org.simpleframework.xml.stream.StreamProvider.&lt;init&gt; unable to resolve static method 3372: Ljavax/xml/stream/XMLInputFactory;.newInstance ()Ljavax/xml/stream/XMLInputFactory; dead code 0x0006-0009 in Lorg/simpleframework/xml/stream/StreamProvider;.&lt;init&gt; unable to find class referenced in signature (Ljavax/xml/stream/XMLEventReader;) </code></pre> <p>What can be the cause of the problem and how can I solve it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload