title: ionic error 404 not found with ionic run android
body: <p>I have an ionic app which works well with ionic serve when I make POST orGET requests to my localhost , bt when I make ionic uild android and then ionic run android I always get a 404 POST not found,
  I tried almost everything.
  I have added the plugin whitelist and put in my config.xml</p>
  
  <pre><code>  &lt;content src="index.html"/&gt;
    &lt;access origin="*"/&gt;
    &lt;allow-intent href="*"/&gt;
    &lt;allow-navigation href="*"/&gt;
  </code></pre>
  
  <p>in index html I tried these meta(commented one and uncommented the other)</p>
  
  <pre><code>    &lt;!-- &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self'&gt; --&gt;
  
      &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' * ws://localhost:35729 data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *;script-src 'self' localhost:35729 'unsafe-eval' 'unsafe-inline';"&gt;
  </code></pre>
  
  <p>I use sails as the backend , I think cors are well configured:</p>
  
  <pre><code>module.exports.cors = {
  /***************************************************************************
   *                                                                          *
   * Allow CORS on all routes by default? If not, you must enable CORS on a   *
   * per-route basis by either adding a "cors" configuration object to the    *
   * route config, or setting "cors:true" in the route config to use the      *
   * default settings below.                                                  *
   *                                                                          *
   ***************************************************************************/
  allRoutes: true,
  
  /***************************************************************************
   *                                                                          *
   * Which domains which are allowed CORS access? This can be a               *
   * comma-delimited list of hosts (beginning with http:// or https://) or    *
   * "*" to allow all domains CORS access.                                    *
   *                                                                          *
   ***************************************************************************/
  origin: '*',
  
  /***************************************************************************
   *                                                                          *
   * Allow cookies to be shared for CORS requests?                            *
   *                                                                          *
   ***************************************************************************/
  credentials: true,
  
  /***************************************************************************
   *                                                                          *
   * Which methods should be allowed for CORS requests? This is only used in  *
   * response to preflight requests (see article linked above for more info)  *
   *                                                                          *
   ***************************************************************************/
  methods: 'GET, POST, PUT, DELETE, OPTIONS, HEAD',
  
  /***************************************************************************
   *                                                                          *
   * Which headers should be allowed for CORS requests? This is only used in  *
   * response to preflight requests.                                          *
   *                                                                          *
   ***************************************************************************/
  headers: 'content-type, access-control-allow-origin, authorization'
  </code></pre>
  
  <p>};</p>
  
  <p>At the beginning of app.js I have this config</p>
  
  <pre><code>  angular
  .module('frontend', [
    'ionic', 'ionic.service.core',
    'frontend.core',
    'ionic.service.analytics',
    //'cacheapp',
    //'cachemodule',
    'ionic-cache-src',
    'formlyIonic',
    'pascalprecht.translate',
    'angularMoment',
    'ionic.components',
    'ngFacebook',
    'translate.app',
    'translate.form',
    'angular-cache',
    'ngCordova',
    'gettext',
    'module.user',
    'module.gallery'
  ])
  .constant('AccessLevels',{
        anon: 0,
        user: 1,
        admin: 2
  })
  .constant('BackendConfig',{
    url: "http://api-test-dev.com:1337",
    //url: "http://ip_of_my_phone:1337"
    //url: "10.0.2.2"
    //url: "10.0.2.2:1337"
    //url:"http://ip_of_my_phone"
    //url:"http://ip_of_my_wifi"
    //url:"http://ip_of_my_wifi:1337"
  })
  </code></pre>
  
  <p>commented urls are all options I tried : I got them with ifconfig , when it was the case of my phone I disabled the wifi on my computer and used the connection usb of my phone(so the ip was usb0 in ifconfig). I also tried the url "<a href="http://localhost:1337" rel="nofollow">http://localhost:1337</a>" in app.js using port forwarding on chrome://inspect/#devices (by assigning to port 1337 of my device the localhost:1337 of my computer)
  . For listed urls in my file app.js I disabled port forwarding</p>
  
  <p>But all configuration always  give the error POST 404 not found</p>
  
  <p>Any ideas?</p>