title: Error building Android app in release mode, in Android Studio
body: <p>I'm trying to sign my android app in release mode, in Android Studio.</p>
  
  <p>I followed <a href="http://developer.android.com/tools/publishing/app-signing.html" rel="nofollow">this official guide</a>. So I have created the keystore and a private key. Then I tried to Generate the Signed APK, from <strong>Build -> Generate Signed API Key</strong>. But the build fails, with the following error:</p>
  
  <pre><code>:app:packageRelease FAILED
  Error:A problem was found with the configuration of task ':app:packageRelease'.
  &gt; File 'C:\Documents\myapp\android.jks' specified for property 'signingConfig.storeFile' does not exist.
  </code></pre>
  
  <p>I have also checked the build.gradle configuration. And I have found this:</p>
  
  <pre><code>   signingConfigs {
          releaseConfig {
              keyAlias 'xxxxxxxxxx'
              keyPassword 'xxxxxxxxx'
              storeFile file('C:\Documents\myapp\android.jks')
              storePassword 'xxxxxxxxx'
          }
      }
  </code></pre>
  
  <p>but in the same gradle file I have this:</p>
  
  <pre><code>buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              signingConfig signingConfigs.releaseConfig
          }
      }
  </code></pre>
  
  <p>What's wrong?</p>