title: Cleartext HTTP traffic to myserver.com not permitted on Android N preview
body: <p>Yesterday I got a new upgrade for the Android N preview. Ever since I upgraded, I cannot start my app anymore. </p>
  
  <pre><code>java.io.IOException: Cleartext HTTP traffic to myserver.com not permitted
  </code></pre>
  
  <p>I have tried to set the <code>usesCleartextTraffic</code> to <code>true</code> in the manifest or to add a <code>network_security_config.xml</code> </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;network-security-config&gt;
      &lt;domain-config cleartextTrafficPermitted="true"&gt;
          &lt;domain includeSubdomains="true"&gt;myserver.com&lt;/domain&gt;
      &lt;/domain-config&gt;
  &lt;/network-security-config&gt;
  </code></pre>
  
  <p>Neither did work. Any ideas about what is going on there?</p>
  
  <p>When I try to define networkSecurityConfig in the manifest, I get a compile error</p>
  
  <pre><code>Error:(35) No resource identifier found for attribute 'networkSecurityConfig' in package 'android'
  </code></pre>
  
  <p>Not really sure why. The file is there and everything looks good.</p>
  
  <p>Found <a href="https://code.google.com/p/android/issues/detail?can=2&amp;start=0&amp;num=100&amp;q=&amp;colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&amp;groupby=&amp;sort=&amp;id=212584" rel="noreferrer">this</a> suggestion in the Android issue tracker from Google. They suggest to move the <code>network_security_config</code> definition to the <code>meta-data</code>. I still get the same exception though.</p>