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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:41:11+00:00 2026-06-12T21:41:11+00:00

I am trying to create a simple android app that will communicate with website.

  • 0

I am trying to create a simple android app that will communicate with website. The problem I am having is that every time I try and use the HttpPost Eclipse’s debugger tells me that:
Source not Found
The JAR file C:\Users…\android-sdk\plarforms\android-16\android.jar has no source attachment
You can attach the source by clicking Attach Source below:

I tried to attach a few jar files but nothing has worked. Here is my code:

    public void onClick(View v) {

    URI website = null;
    HttpResponse response = null;
    BufferedReader in = null;


    HttpClient client = new DefaultHttpClient();

    try {
        website = new URI("http://fakewebsite.php");
    } catch (URISyntaxException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    HttpGet getRequest = new HttpGet();
    getRequest.setURI(website);

    HttpPost postRequest = new HttpPost();

    try {
        response = client.execute(postRequest);
    } catch (ClientProtocolException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

}

Thank you for any help

  • 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-12T21:41:12+00:00Added an answer on June 12, 2026 at 9:41 pm

    use

     response = client.execute(getRequest);
    

    instead of

     response = client.execute(postRequest);
    

    you are getting this error because you are currently not setting URI for

    HttpPost postRequest = new HttpPost();

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

Sidebar

Related Questions

I am trying to create a simple 3-D app for android that will have
So I was trying to follow http://developer.android.com/guide/topics/media/camera.html to create a simple app that captures
I am trying to create a simple android widget that shows The time but
I am trying to create an android app that will connect to various web
Okay, I'm trying to create a simple app that will draw a shape (I'm
I am trying to create an android app that will change the font at
I'm trying to create an app for Android that simply sends a command to
I'm trying to create a simple app for android with progress bar . Everything
I am trying to create a simple Android application that has a ActivityList of
I am trying to create an app that will obtain the users location via

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.