AssertionError on android.util.Xml.parse

by Cleverson » Fri, 23 Apr 2010 06:09:40 GMT

Sponsored Links

I'm getting an AssertionError when calling Xml.parse. This error
usually occurs when I run the app and keep switching the phone
connectivity from Wifi to 3G and vice versa. I checked the source code
of the android.util.Xml class and see something that I couldn't not
understand well, for example

    public static void parse(InputStream in, Encoding encoding,
            ContentHandler contentHandler) throws IOException,
SAXException {
        try {
            XMLReader reader = new ExpatReader();
            InputSource source = new InputSource(in);
        } catch (IOException e) {
            throw new AssertionError(e);

Is it "normal" to handle an IOException like it is done in this class?
I mean, why catching a checked exception and turn it to an
AssertionError? Should clients be supposed to catch AssertionErrors
when calling the parse method?

Thanks in advance!


Other Threads

1. Help getting platform

let me first say that I'm new to Adroid and SDK

Problem: when I try to download the any platform under the "Availible
Packages" section of the Android GUI, it doesn't do anything when I
click "Install Selected". It will get the list and show me what can be
downloaded, but won't actually download it.

What I've done:
Java is installed
the PATH is set in my .bashrc file
added "sdkman.force.http=true" to .android/androidtools.cfg

Any ideas would be appreciated. Thanks


2. WVGA432 and long/notlong

I set up layout folders as follows:


Other than "layout" each folder has a main.xml file. The "layout"
folder contains layouts that are screen independent.

I set up AVDs for WQVGA400 and WQVGA432. From the docs, it looks like
both should be long. On the 400 the long layout is applied, but on the
432 the notlong layout is applied.

What am I not understanding about this? I want long applied on the 432


3. voice quality not good

4. Scenes berubah based on operator?

5. ExpandableListView crash when the list starts empty

6. MPEG2 TS + HTTP Live Streaming Support on Android

7. Audio Stream Processing