title: Android: HTTPClient
body: <p>I was trying http-cleint tutorials from svn.apache.org. While running the application I am getting the following error in console.</p>
  
  <pre><code>[2010-04-30 09:26:36 - HalloAndroid] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.org.example/.HalloAndroid } from null (pid=-1, uid=-1) requires android.permission.INTERNET
  </code></pre>
  
  <p>I have added android.permission.INTERNET in AndroidManifest.xml.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.org.example"
        android:versionCode="1"
        android:versionName="1.0"&gt;
      &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
          &lt;activity android:name=".HalloAndroid"
                    android:label="@string/app_name" android:permission="android.permission.INTERNET"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>The java code in HalloAndroid.java is as follows</p>
  
  <pre><code> HttpClient httpclient = new DefaultHttpClient();
      HttpGet httpget2 = new HttpGet("http://google.com/");
          HttpResponse response2 = null;
          try {
              response2 = httpclient.execute(httpget2);
          } catch (ClientProtocolException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          } catch (IOException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
      HttpEntity entity = response2.getEntity();
      if (entity != null) {
          long len = entity.getContentLength();
          if (len != -1 &amp;&amp; len &lt; 2048) {
              try {
                      Log.d(TAG, EntityUtils.toString(entity));
                  } catch (ParseException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  } catch (IOException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
          } else {
              // Stream content out
          }
  </code></pre>
  
  <p>Any help is much appreciated.</p>