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 8862143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:39:27+00:00 2026-06-14T15:39:27+00:00

I am following this tutorial and I can make it work just fine, but

  • 0

I am following this tutorial and I can make it work just fine, but when I try to update the UI to fit the new Holo.Light in android 4.2 the app crashes at launch, and I don’t know why.

I have been searching for a way to update the UI but I could not get it to work.

I wonder if anybody could help me? tell me how? Give me a link that you know would work?
or even do it yourself?

i get this error log:

11-20 09:50:39.523: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:39.682: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
11-20 09:50:39.892: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:40.003: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
11-20 09:50:40.102: D/AndroidRuntime(1460): Shutting down VM
11-20 09:50:40.102: W/dalvikvm(1460): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
11-20 09:50:40.132: E/AndroidRuntime(1460): FATAL EXCEPTION: main
11-20 09:50:40.132: E/AndroidRuntime(1460): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.os.Looper.loop(Looper.java:137)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.ActivityThread.main(ActivityThread.java:4424)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at java.lang.reflect.Method.invokeNative(Native Method)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at java.lang.reflect.Method.invoke(Method.java:511)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at dalvik.system.NativeStart.main(Native Method)
11-20 09:50:40.132: E/AndroidRuntime(1460): Caused by: android.os.NetworkOnMainThreadException
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at java.net.InetAddress.getAllByName(InetAddress.java:220)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at com.androidhive.jsonparsing.JSONParser.getJSONFromUrl(JSONParser.java:38)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at com.androidhive.jsonparsing.AndroidJSONParsingActivity.onCreate(AndroidJSONParsingActivity.java:53)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.Activity.performCreate(Activity.java:4465)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
11-20 09:50:40.132: E/AndroidRuntime(1460):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
11-20 09:50:40.132: E/AndroidRuntime(1460):     ... 11 more
11-20 09:50:40.392: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:40.412: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
11-20 09:50:40.791: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:40.962: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
  • 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-14T15:39:28+00:00Added an answer on June 14, 2026 at 3:39 pm

    There are two Solution of this Problem.

    1) Don’t write network call in Main UIThread, Use Async Task for that.

    2) Write below code into your MainActivity file after setContentView(R.layout.activity_main);

    if (android.os.Build.VERSION.SDK_INT > 9) {
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }
    

    And below import statement into your java file.

    import android.os.StrictMode;
    

    and see below link for more information.

    Twitter connect error

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

Sidebar

Related Questions

I was following this tutorial , but for the life of me I cant
I tried following this http://net.tutsplus.com/tutorials/javascript-ajax/an-introduction-to-the-raphael-js-library/ tutorial, but it does not work exactly with Raphael
I am following this tutorial. Can anyone please explain to me how I can
I've been following the tutorial from msdn and it just doesn't work. First problem
I am following along with this Django blog tutorial and can not get the
By following this tutorial I was able to make a view roughly laid out
Following this tutorial and running into trouble. [TestMethod] [ExpectedException(typeof(Exception))] public void VerifyPropertyNameMethod_NonExistentPropertyString_ThrowsException() { var
Following this tutorial (http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/handling-concurrency-with-the-entity-framework-in-an-asp-net-mvc-application), I learned how to save data and do concurrency checks
i'm following this tutorial: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide and downloading my own source of mod_wsgi. The problem
I was following this tutorial: http://www.vogella.com/articles/AndroidLocationAPI/article.html --> Paragraph 6.0 Problem: My emulator runs perfectly

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.