Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8297831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:33:09+00:00 2026-06-08T15:33:09+00:00

Im trying to make a Manga Rss-Reader app using the XmlPullParser that was used

  • 0

Im trying to make a Manga Rss-Reader app using the XmlPullParser that was used in this IBM example. I have taken the IBM source code and only changed the feedURL to “http://fandom.com/rss/new/manga” and the PUB_DATE string in all files has been changed to PUBDATE instead. Still I cant get the app to run correctly.

For reference I have renamed the source Otaku as I plan to use it as the base for a new app. It’s supposed to show this Rss feed as a ListView but I dont understand where the problem lies. I happen to be logcat illiterate :(.
my log cat states:

07-29 13:24:17.963: E/Trace(670): error opening trace file: No such file or directory(2)
07-29 13:24:18.113: W/ActivityThread(670): Application com.mypacks.activities.otaku is waiting for the debugger on port 8100...
07-29 13:24:18.133: I/System.out(670): Sending WAIT chunk
07-29 13:24:18.133: I/dalvikvm(670): Debugger is active
07-29 13:24:18.333: I/System.out(670): Debugger has connected
07-29 13:24:18.333: I/System.out(670): waiting for debugger to settle...
07-29 13:24:18.533: I/System.out(670): waiting for debugger to settle...
07-29 13:24:18.733: I/System.out(670): waiting for debugger to settle...
07-29 13:24:18.943: I/System.out(670): waiting for debugger to settle...
07-29 13:24:19.171: I/System.out(670): waiting for debugger to settle...
07-29 13:24:19.386: I/System.out(670): waiting for debugger to settle...
07-29 13:24:19.646: I/System.out(670): waiting for debugger to settle...
07-29 13:24:19.857: I/System.out(670): waiting for debugger to settle...
07-29 13:24:20.089: I/System.out(670): debugger has settled (1518)
07-29 13:24:20.753: I/AndroidNews(670): ParserType=XML_PULL
07-29 13:24:20.903: E/AndroidNews(670): android.os.NetworkOnMainThreadException
07-29 13:24:20.903: E/AndroidNews(670): java.lang.RuntimeException: android.os.NetworkOnMainThreadException
07-29 13:24:20.903: E/AndroidNews(670):     at com.mypacks.internals.otaku.XmlPullFeedParser.parse(XmlPullFeedParser.java:57)
07-29 13:24:20.903: E/AndroidNews(670):     at com.mypacks.internals.otaku.MessageList.loadFeed(MessageList.java:77)
07-29 13:24:20.903: E/AndroidNews(670):     at com.mypacks.internals.otaku.MessageList.onCreate(MessageList.java:33)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.Activity.performCreate(Activity.java:5008)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.ActivityThread.access$600(ActivityThread.java:130)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
07-29 13:24:20.903: E/AndroidNews(670):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-29 13:24:20.903: E/AndroidNews(670):     at android.os.Looper.loop(Looper.java:137)
07-29 13:24:20.903: E/AndroidNews(670):     at android.app.ActivityThread.main(ActivityThread.java:4745)
07-29 13:24:20.903: E/AndroidNews(670):     at java.lang.reflect.Method.invokeNative(Native Method)
07-29 13:24:20.903: E/AndroidNews(670):     at java.lang.reflect.Method.invoke(Method.java:511)
07-29 13:24:20.903: E/AndroidNews(670):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-29 13:24:20.903: E/AndroidNews(670):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-29 13:24:20.903: E/AndroidNews(670):     at dalvik.system.NativeStart.main(Native Method)
07-29 13:24:20.903: E/AndroidNews(670): Caused by: android.os.NetworkOnMainThreadException
07-29 13:24:20.903: E/AndroidNews(670):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
07-29 13:24:20.903: E/AndroidNews(670):     at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
07-29 13:24:20.903: E/AndroidNews(670):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
07-29 13:24:20.903: E/AndroidNews(670):     at java.net.InetAddress.getAllByName(InetAddress.java:214)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpConnection.<init>(HttpConnection.java:70)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:341)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:315)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpEngine.connect(HttpEngine.java:310)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
07-29 13:24:20.903: E/AndroidNews(670):     at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
07-29 13:24:20.903: E/AndroidNews(670):     at com.mypacks.internals.otaku.BaseFeedParser.getInputStream(BaseFeedParser.java:36)
07-29 13:24:20.903: E/AndroidNews(670):     at com.mypacks.internals.otaku.XmlPullFeedParser.parse(XmlPullFeedParser.java:19)
07-29 13:24:20.903: E/AndroidNews(670):     ... 16 more
07-29 13:24:21.173: I/Choreographer(670): Skipped 44 frames!  The application may be doing too much work on its main thread.
07-29 13:24:21.223: D/gralloc_goldfish(670): Emulator without GPU emulation detected.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:33:10+00:00Added an answer on June 8, 2026 at 3:33 pm

    This is the important bit from your logcat:

    Caused by: android.os.NetworkOnMainThreadException
    

    That is telling you that you are trying to make your network request to get the RSS feed from the main thread.

    Starting with Honeycomb (IIRC) doing net requests on the main thread will throw an exception because the platform creators wanted to give you a reminder that network operations should not take place on the main thread.

    The quickets way to “fix” this is to build your application for a lower API level.

    The more correct solution is to move your network operation onto its own background thread. One way to do so is to change the onCreate() method in your RSSReader activity to look like this:

    private RSSFeed feed = null;
    private Handler h;
    
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
        //Set up a Handler to call updateDisplay() once the feed has been fetched.
        h = new Handler(){
            @Override
            public void handleMessage(Message msg){
                // display UI
                UpdateDisplay();
            }
        };
    
    
        Thread t = new Thread() {
            @Override
            public void run() {
    
                // go get our feed!
                feed = getFeed(RSSFEEDOFCHOICE);
                //Send a signal to the handler to tell it that we are done fetching the feed.
                h.sendEmptyMessage(0);
    
            }
        };
        t.start();
    
    }
    

    Another way you could do this is with an AsyncTask.

    This Lars Vogella blog post is a GREAT resource to use when learning about both Thread/Handler and AsyncTask.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I am trying to make a program that can convert a series of manga
Trying to make a simple client that consumes a web service using RemObjects SDK,
Trying to make a Grid Like this using java and I'm assuming a 2d
I'm trying make an entity with doctrine that has three associations with other entities
I am fairly new to iOS development and trying make a simple app which
Trying to make a simple number clicker control for BlackBerry 6/7, like this: At
Trying to make a small countdown timer in my app but it's not working.
I'm just starting out on my first 'real' cocoa app. Note that this is
im trying make one replace in string from a array but this dont work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.