title: Android Studio: how to generate signed APK using Gradle?
body: <p>I've searched on Google and SO but cannot find my answer.</p>
  <p>This is the first time I'm working with the Gradle system and I am now at the point of generating a signed APK to upload to Google Play (project is imported from eclipse).</p>
  <p>Now, I've read the part <a href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Building-and-Tasks" rel="nofollow noreferrer">here</a> that you should add <code>signingConfigs</code> to your <code>build.gradle</code>.</p>
  <p>I've added these lines and now I saw that you need to run <code>./gradlew assembleRelease</code> but running this in my CMD returns</p>
  <blockquote>
  <p>'gradle' is not recognized as an internal or external command,
  operable program or batch file.</p>
  </blockquote>
  <p>I've also tried to right click on the build.gradle and run it, saying it was sucessful but once I look in the build/apk folder only a file called <code>app-debug-unaligned.apk</code>.</p>
  <p>So, how do I generate the signed APK using the Gradle system?</p>