title: Permission denied (missing INTERNET permission?): But permission is given
body: <p>I'm trying to call a httpClient and the response is "Permission denied (missing INTERNET permission?)". In the normal browser of Android I can open the URL without problems.</p>
  
  <pre><code> public static String getHttpResponse(URI uri) {
      StringBuilder response = new StringBuilder();
      try {
  
          HttpGet get = new HttpGet();
          get.setURI(uri);
          DefaultHttpClient httpClient = new DefaultHttpClient();
          HttpResponse httpResponse = httpClient.execute(get);
  
          if (httpResponse.getStatusLine().getStatusCode() == 200) {
              Log.d("demo", "HTTP Get succeeded");
  
              HttpEntity messageEntity = httpResponse.getEntity();
              InputStream is = messageEntity.getContent();
              BufferedReader br = new BufferedReader(new InputStreamReader(is));
              String line;
              while ((line = br.readLine()) != null) {
                  response.append(line);
              }
          }
      } catch (Exception e) {
          Log.e("demo", e.getMessage());
      }
      Log.d("demo", "Done with HTTP getting");
      return response.toString();
  }
  </code></pre>
  
  <p>The catch log tell me the error:</p>
  
  <pre><code>java.lang.SecurityException: Permission denied (missing INTERNET permission?)
  libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
  Permission denied (missing INTERNET permission?)
  </code></pre>
  
  <p>In my Manifest is the permission set:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="..." &gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
      &lt;uses-feature android:name="android.hardware.camera" android:required="true" /&gt;
  
      &lt;activity
          android:name=".main"
          android:label="@string/app_name" &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;
  </code></pre>
  
  <p></p>