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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:44:32+00:00 2026-05-28T19:44:32+00:00

i have developing an android application that requests an httpget and then it converts

  • 0

i have developing an android application that requests an httpget and then it converts to string and put it on a textview, but as far i got is a annoying error on the emulator and on my android device, here it is:

01-26 05:08:25.346: D/AndroidRuntime(523): Shutting down VM
01-26 05:08:25.346: W/dalvikvm(523): threadid=1: thread exiting with uncaught exception (group=0x40015560)
01-26 05:08:25.366: E/AndroidRuntime(523): FATAL EXCEPTION: main
01-26 05:08:25.366: E/AndroidRuntime(523): java.lang.IllegalStateException: Could not execute method of the activity
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.view.View$1.onClick(View.java:2144)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.view.View.performClick(View.java:2485)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.view.View$PerformClick.run(View.java:9080)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.os.Handler.handleCallback(Handler.java:587)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.os.Handler.dispatchMessage(Handler.java:92)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.os.Looper.loop(Looper.java:123)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.app.ActivityThread.main(ActivityThread.java:3683)
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.lang.reflect.Method.invokeNative(Native Method)
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.lang.reflect.Method.invoke(Method.java:507)
01-26 05:08:25.366: E/AndroidRuntime(523):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-26 05:08:25.366: E/AndroidRuntime(523):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-26 05:08:25.366: E/AndroidRuntime(523):  at dalvik.system.NativeStart.main(Native Method)
01-26 05:08:25.366: E/AndroidRuntime(523): Caused by: java.lang.reflect.InvocationTargetException
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.lang.reflect.Method.invokeNative(Native Method)
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.lang.reflect.Method.invoke(Method.java:507)
01-26 05:08:25.366: E/AndroidRuntime(523):  at android.view.View$1.onClick(View.java:2139)
01-26 05:08:25.366: E/AndroidRuntime(523):  ... 11 more
01-26 05:08:25.366: E/AndroidRuntime(523): Caused by: java.net.UnknownHostException: www.conecciones.net
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
01-26 05:08:25.366: E/AndroidRuntime(523):  at java.net.InetAddress.getAllByName(InetAddress.java:256)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
01-26 05:08:25.366: E/AndroidRuntime(523):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
01-26 05:08:25.366: E/AndroidRuntime(523):  at sys.temperature.ConvertActivity.executeHttpGet(ConvertActivity.java:82)
01-26 05:08:25.366: E/AndroidRuntime(523):  at sys.temperature.ConvertActivity.myClickHandler(ConvertActivity.java:70)
01-26 05:08:25.366: E/AndroidRuntime(523):  ... 14 more
01-26 05:08:29.187: I/Process(523): Sending signal. PID: 523 SIG: 9

And here is my code:

public void executeHttpGet(String cis) throws Exception {
    BufferedReader in = null;
    try {
        HttpClient client = new DefaultHttpClient();
        Toast.makeText(this, "http://www.**************.net/******/test.php?ci=" + cis, 2).show();            
        HttpGet request = new HttpGet(http://www.**************.net/******/test.php?ci=" + cis);
        //request.setURI(new URI("http://w3mentor.com/"));
        HttpResponse response = client.execute(request);
        in = new BufferedReader
        (new InputStreamReader(response.getEntity().getContent()));
        StringBuffer sb = new StringBuffer("");
        String line = "";
        String NL = System.getProperty("line.separator");
        while ((line = in.readLine()) != null) {
            sb.append(line + NL);
        }
        in.close();
        String page = sb.toString();
        System.out.println(page);
        } finally {
        if (in != null) {
            try {
                in.close();
                } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

What im doing wrong?
Thanks and have a nice day!

  • 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-05-28T19:44:34+00:00Added an answer on May 28, 2026 at 7:44 pm

    Don’t forget to add internet permission in your AndroidManifest.xml file.

    <uses-permission
            android:name="android.permission.INTERNET" />
    <uses-permission
            android:name="android.permission.ACCESS_NETWORK_STATE" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an android application in which I have passed a string from
I am developing an Android application that gets your current GPS location but the
Hi i am developing android application. I that i have creating the dynamic table
I'm developing an Android application with a database. That database will have more than
I'm new to android developing but right now I'm working on an application that
I'm developing an Android application. I have a database table and I want to
I have been developing Android application where I use this code: Date d=new Date(new
I am developing an android application that receives data about events from a server.
I am developing an Android application that is linked into a Wordpress site. I
I have been developing Android application, and I have one question - ListView uses

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.