Looks like I answered my own question :)

I allowed Eclipse to auto correct my code, and it added a try - catch
routine:

HttpClient httpclient = new DefaultHttpClient();
        HttpGet httpget = new HttpGet("http://www.google.com";);
        try {
                        HttpResponse response = httpclient.execute(httpget);
                } catch (ClientProtocolException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

My code complies now, so I can go back to exploring :)

On Dec 8, 3:28 pm, rustyventure <[EMAIL PROTECTED]> wrote:
> Hi, everyone:


>
> I'm just starting to play around with the Android SDK, but i haven't
> developed any Java apps for a few years and my skills are a little
> rusty ...
>
> I'm trying some code that uses the HttpClient class. From what I've
> seen from other online examples, the following code should work:
>
> HttpClient httpclient = new DefaultHttpClient();
> HttpGet httpget = new HttpGet("http://www.google.com";);
> HttpResponse response = httpclient.execute(httpget);
>
> However, Eclipse won't let me debug this as httpclient.execute
> (httpget) is underlined with an error: "Unhandled exception type
> ClientProtocolException". Any ideas why I'm getting this error? Thanks
> in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to