title: Could not connect to development server on android emulator and on real device
body: <p>When I run "react-native run-android",it gives me error:"could not connect to development server...".-- The red screen</p>
  
  <ul>
  <li>OS: Windows 7 </li>
  <li>node version:8.2.1</li>
  <li>npm version:4.1.2</li>
  <li>react-native version:0.47.1</li>
  <li>react-native-cli version:2.0.1 </li>
  <li>android device and emulator version: 5.1.1</li>
  </ul>
  
  <p>i followed following command:</p>
  
  <ul>
  <li>react-native init ProjectName</li>
  <li>cd ProjectName</li>
  <li>react-native run-android</li>
  </ul>
  
  <p>And this makes the package server run automatically.
  But I am not able to access the package server from browser on the machine and the mobile.</p>
  
  <p>My android device connected to computer has debugging enabled i checked it using adb devices command.
  Usb debug is on.</p>
  
  <p>I tried running the project on real device and on emulator. On Both I got error: "Unable to load script from assets 'index.android.bundle' Make sure your bundle is packaged correctly or you're running a package server'.</p>
  
  <p>reloading i get the error: "Could not connect to development server."</p>
  
  <p>Then i set the host and port number on development setting on both and got the error "Could not connect to development server."</p>
  
  <p><a href="https://i.stack.imgur.com/SDBVt.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>So how to fix the red error screen issue?Any suggestion is appreciated!</p>