title: Android studio can't detect gradle
body: <p>I used to work with Android studio normally. yesterday I downloaded the newest version of android Studio 2.12. But now, when i open any project i receive the following message</p>
  
  <pre><code>Gradle 'EcoAssistant_03' project refresh failed
  Error:Connection refused: connect
  </code></pre>
  
  <p>and I found that all my classes marked with red and as if the Android API's are not recognized at all.</p>
  
  <p>To solve this issue, I disabled the online mode by doing the following:</p>
  
  <pre><code>1- File -&gt; setting -&gt; compiler -&gt; command line option -&gt; --offline
  2- File -&gt; setting -&gt; tick offline mode
  </code></pre>
  
  <p>But that did not solve the problem.</p>