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

  • SEARCH
  • Home
  • 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 8087143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:40:44+00:00 2026-06-05T18:40:44+00:00

Recently, I was asked to compile some of my Android projects, based on the

  • 0

Recently, I was asked to compile some of my Android projects, based on the 2.3, for the new 4.0 versions. So without much knowledge on how to do it, I simply tried to do it myself by making a few changes in the manifest file like the min SDK and targeted SDK. I set the min SDK to 10 and targeted SDK to 15. Hoping that would somehow work, I test run my codes only to see that it doesn’t work out the way I hope. Of course, it works really well on the 2.3, both on simulator and device.

Is there a way to upgrade / convert this project to compile and build with the latest version other that redoing it? Can anyone help?

EDIT 1:
After hours of troubleshooting, and searching for online clues. I decided to look this a little more deeper. I found out that this line:

DefaultHttpClient client = new MyHttpClient(getApplicationContext());
HttpGet get = new HttpGet(url11);
HttpResponse getResponse = client.execute(get); // 4.0.3 crashes here.... 

Was the cause of the problem. Now I ran the AVD Manager from 2.3.3 and 4.0.3 to test out this problem , and it turns out that this line runs smoothly with no errors on the 2.3.3. Could there be a deprecation or something in the new 4.0.3?

  • 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-05T18:40:45+00:00Added an answer on June 5, 2026 at 6:40 pm

    Most probably it’s caused by performing network operations on main thread.

    It causes NetworkOnMainThreadException when the targetSdkVersion is 11 or higher on AndroidManifest.xml.

    Move it to the background thread using AsyncTask or AsyncTaskLoader.

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

Sidebar

Related Questions

I recently asked a question about structs, and optimizing some overloaded operators. The original
I recently asked about accessing data from SPSS and got some absolutely wonderful help
I was recently asked to do some research on some third party HTML editors
Someone recently asked me the difference between a C++ standard operator (e.g. new,delete,sizeof) and
I recently asked this question here and got some great answers! Custom SQL GROUP
I recently asked a question about some problems I was having getting MIT Kerberos
I recently asked a question and posted some code, to which a suggestion was
I recently asked a question on using volatile and was directed to read some
I was recently asked to update the copyright information for all of our projects
I recently asked this question , but after some of the responses and some

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.